{"id":51197066,"url":"https://github.com/berabuddies/Semia","last_synced_at":"2026-06-28T04:01:03.401Z","repository":{"id":357240048,"uuid":"1229574762","full_name":"berabuddies/Semia","owner":"berabuddies","description":"Semia, security audit for AI agent skills.","archived":false,"fork":false,"pushed_at":"2026-05-27T01:59:19.000Z","size":939,"stargazers_count":229,"open_issues_count":4,"forks_count":50,"subscribers_count":38,"default_branch":"main","last_synced_at":"2026-05-27T03:23:01.094Z","etag":null,"topics":["claude-code","codex","openclaw","security","skill-scanner","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berabuddies.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-05T07:21:12.000Z","updated_at":"2026-05-27T03:01:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/berabuddies/Semia","commit_stats":null,"previous_names":["riemalabs/semia-skillscan","riemalabs/semia"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/berabuddies/Semia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berabuddies%2FSemia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berabuddies%2FSemia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berabuddies%2FSemia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berabuddies%2FSemia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berabuddies","download_url":"https://codeload.github.com/berabuddies/Semia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berabuddies%2FSemia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34876271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","codex","openclaw","security","skill-scanner","static-analysis"],"created_at":"2026-06-27T21:31:06.297Z","updated_at":"2026-06-28T04:01:03.394Z","avatar_url":"https://github.com/berabuddies.png","language":"Python","funding_links":[],"categories":["⭐ 精选第三方技能","Security Review Skills","🧠 Agent Skills"],"sub_categories":["🤖 AI Agent"],"readme":"# Semia\n\n\u003e **Security audit for AI agent skills.** Know what a skill *can* do\n\u003e before you trust it.\n\n[![CI](https://github.com/berabuddies/Semia/actions/workflows/ci.yml/badge.svg)](https://github.com/berabuddies/Semia/actions/workflows/ci.yml)\n[![Lint](https://github.com/berabuddies/Semia/actions/workflows/lint.yml/badge.svg)](https://github.com/berabuddies/Semia/actions/workflows/lint.yml)\n[![codecov](https://codecov.io/gh/berabuddies/Semia/graph/badge.svg)](https://codecov.io/gh/berabuddies/Semia)\n[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)\n[![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](pyproject.toml)\n\nAgent skills are markdown files with embedded shell commands, network calls,\nand tool invocations. They run with **your credentials, on your machine,\nwith your data**. Semia reads a skill as data — never executes it — and\nproduces an evidence-backed report of every capability it may exercise.\n\nIt is the difference between\n\n\u003e *\"I trust this skill because the README looks fine.\"*\n\nand\n\n\u003e *\"I trust this skill because Semia extracted 14 actions, 6 effects,\n\u003e and 2 secret reads — and every one is grounded in a specific source line.\"*\n\n---\n\n## Quick example\n\nPick whichever fits how you already work.\n\n### As a CLI\n\n```bash\npip install semia-audit\nsemia scan ./some-skill\n```\n\n`scan` does prepare → synthesize (via your configured LLM provider) →\ndetect → report in one shot. Output lands under\n`.semia/runs/\u003cskill-slug\u003e/` by default — pass `--out \u003cpath\u003e` to override.\nYou'll need an LLM provider configured first — see\n[Set up an LLM provider](#set-up-an-llm-provider) below.\n\n### Inside Codex, Claude Code, or OpenClaw\n\nInstall the plugin once. Each host has its own flow.\n\n**Codex** — pick either path:\n\n*Shell (scripts and CI):*\n\n```bash\ncodex plugin marketplace add berabuddies/Semia\n```\n\nThen enable the plugin by appending to `~/.codex/config.toml`:\n\n```toml\n[plugins.\"semia@semia\"]\nenabled = true\n```\n\n*Interactive plugin manager inside the Codex CLI:*\n\n1. Launch `codex`.\n2. Inside Codex, input `/plugins` (plural — opens the plugin panel).\n3. Press **←** (Left) to enter **Add marketplace**.\n4. Enter `berabuddies/Semia`.\n5. Back in the plugin panel, toggle `semia` on from the\n   newly-added marketplace.\n\n**Claude Code** — pick either path:\n\n*Shell (one-liner):*\n\n```bash\nclaude plugin marketplace add berabuddies/Semia\nclaude plugin install semia@semia\n```\n\n*Interactive plugin manager inside the Claude Code CLI:*\n\n1. Launch `claude`.\n2. Inside Claude Code, input `/plugins` (plural — opens the plugin panel).\n3. Press **→** (Right) twice and select **Add Marketplace**.\n4. Enter `berabuddies/Semia`.\n\nEither path registers the marketplace; finish installing `semia` from\nthe panel or with `claude plugin install semia@semia`.\n\n**OpenClaw** — one shell command registers the marketplace and installs:\n\n```bash\nopenclaw plugins install clawhub:semia\n```\n\nThen in any chat with the host agent just ask:\n\n\u003e Run Semia audit on ./some-skill\n\nThe host agent itself acts as the synthesize step — **no API key needed**.\nThe bundled `semia.pyz` handles prepare / detect / report deterministically.\n\n### Fix what Semia finds\n\n```bash\nsemia repair .semia/runs/some-skill --from-scan\n```\n\n`repair` reads the findings and synthesized facts from an existing scan,\ntraces each violation back through the Datalog rules to identify the root\ncause, then calls an LLM to generate a SKILL.md patch — either fixing\nthe problematic content directly or adding specific security constraints.\n\n```bash\n# Or scan + repair in one shot:\nsemia repair ./some-skill\n```\n\n### Outputs\n\nYou get `report.md` — findings ranked by severity, every one tied to a\nspecific source line. Need [SARIF 2.1.0](https://sarifweb.azurewebsites.net/)\nfor GitHub Code Scanning, or structured JSON for downstream tooling? One\nmore command:\n\n```bash\nsemia report .semia/runs/some-skill --format sarif    # for GitHub Code Scanning\nsemia report .semia/runs/some-skill --format json     # structured payload\n```\n\n## Set up an LLM provider\n\n`semia scan` needs an LLM for the **synthesize** step (the other three\nstages are deterministic, no key required). If you run Semia via a host\nplugin (Codex / Claude Code / OpenClaw) skip this — the host agent already\ndoes synthesize for you.\n\nFour providers are supported. Pick one and export its credentials:\n\n```bash\n# OpenAI Responses API — default; also works for DeepSeek / OpenRouter / vLLM\nexport OPENAI_API_KEY=sk-...\n# optional: export OPENAI_BASE_URL=https://api.deepseek.com/v1\n\n# Anthropic Messages API\nexport SEMIA_LLM_PROVIDER=anthropic\nexport ANTHROPIC_API_KEY=sk-ant-...\n# optional: export ANTHROPIC_BASE_URL=https://api.anthropic.com\n\n# Locally-installed Claude Code CLI (uses your Claude Code login)\nexport SEMIA_LLM_PROVIDER=claude\n\n# Locally-installed Codex CLI (uses your Codex login)\nexport SEMIA_LLM_PROVIDER=codex\n```\n\nOverride the model with `--model \u003cname\u003e` on any `semia scan` invocation, or\npersist it via `SEMIA_LLM_MODEL`. Models are free-form strings — anything\nthe endpoint accepts (`gpt-5.5`, `deepseek-v4`, `claude-opus-4-7`, …).\n\nSee [Configuration](ADVANCED_USAGE.md#configuration) for the full provider\nmatrix, base-URL support, timeout/retry knobs, and synthesis-loop tuning.\n\n## What you get\n\nA run writes everything under `.semia/runs/\u003crun-id\u003e/`. **Most users only\never open the reports**:\n\n| Report              | When                                                      |\n| ------------------- | --------------------------------------------------------- |\n| `report.md`         | always produced by `semia scan` — read this first         |\n| `report.sarif.json` | on demand via `semia report --format sarif` — feed to GitHub Code Scanning |\n| `report.json`       | on demand via `semia report --format json` — structured payload (check + evidence + detector) for programmatic consumers |\n\nBecause every finding traces back to a source line, the SARIF drops cleanly\ninto GitHub Code Scanning and reviewers see annotations directly on the\nskill PR.\n\n\u003cdetails\u003e\n\u003csummary\u003eOther artifacts in the run directory (internal — for tooling, debugging, or re-querying)\u003c/summary\u003e\n\n| Artifact                  | Purpose                                            |\n| ------------------------- | -------------------------------------------------- |\n| `synthesized_facts.dl`    | the behavior map (Datalog facts) — re-queryable    |\n| `detection_findings.dl`   | findings derived by rule evaluation                |\n| `prepared_skill.md`       | normalized skill text with stable line anchors     |\n| `prepare_units.json`      | reference units the evidence text aligns against   |\n| `synthesis_metadata.json` | provider, model, retries, score, stop reason       |\n| `run_manifest.json`       | end-to-end manifest of the run                     |\n| `repair_result.json`      | repair outcomes (when `semia repair` is run)       |\n| `patched/SKILL.md`        | the repaired SKILL.md (when `semia repair` is run) |\n\n\u003c/details\u003e\n\n## More docs\n\n- [Advanced usage](ADVANCED_USAGE.md) covers the worked example, trust\n  model, installation, configuration, and common workflows.\n- [Development](DEVELOPMENT.md) covers the repository layout and local\n  development workflow.\n\n## Project background\n\nThe technique behind Semia is described in the Semia paper\n([arXiv:2605.00314](https://arxiv.org/abs/2605.00314) ·\n[PDF](https://arxiv.org/pdf/2605.00314)). Semia is the\n**deterministic acceptance boundary** around behavior mapping: agents may\nextract facts, but only checked, evidence-grounded facts make it into a\nreport.\n\n## Security\n\nTo report a security vulnerability, see [SECURITY.md](SECURITY.md). Please\ndo **not** file public GitHub issues for security problems.\n\n## Contributing\n\nContributions are welcome — bug reports, documentation fixes, detector\nrules, and code. See [CONTRIBUTING.md](CONTRIBUTING.md) for the workflow\nand the DCO sign-off requirement.\n\n## License\n\nSemia is released under the [Apache License 2.0](LICENSE).\nCopyright 2026 RiemaLabs.\n\n## Citation\n\nIf you use this tool, please cite our paper:\n\n```bibtex\n@misc{wen2026semia,\n  title = {Semia: Auditing Agent Skills via Constraint-Guided Representation Synthesis},\n  author = {Wen, Hongbo and Li, Ying and Liu, Hanzhi and Shou, Chaofan and Chen, Yanju and Tian, Yuan and Feng, Yu},\n  year = {2026},\n  eprint = {2605.00314},\n  archivePrefix = {arXiv},\n  primaryClass = {cs.CR},\n  doi = {10.48550/arXiv.2605.00314},\n  url = {https://arxiv.org/abs/2605.00314}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberabuddies%2FSemia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberabuddies%2FSemia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberabuddies%2FSemia/lists"}