[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76216":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},76216,"Semia","berabuddies\u002FSemia","berabuddies","Semia, security audit for AI agent skills.","",null,"Python",456,59,44,7,0,80,110,384,240,5.33,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32],"claude-code","codex","openclaw","security","skill-scanner","static-analysis","2026-06-12 02:03:40","# Semia\n\n> **Security audit for AI agent skills.** Know what a skill *can* do\n> before you trust it.\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fberabuddies\u002FSemia\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fberabuddies\u002FSemia\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Lint](https:\u002F\u002Fgithub.com\u002Fberabuddies\u002FSemia\u002Factions\u002Fworkflows\u002Flint.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fberabuddies\u002FSemia\u002Factions\u002Fworkflows\u002Flint.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fberabuddies\u002FSemia\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fberabuddies\u002FSemia)\n[![License: Apache-2.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache--2.0-blue.svg)](LICENSE)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-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> *\"I trust this skill because the README looks fine.\"*\n\nand\n\n> *\"I trust this skill because Semia extracted 14 actions, 6 effects,\n> 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 .\u002Fsome-skill\n```\n\n`scan` does prepare → synthesize (via your configured LLM provider) →\ndetect → report in one shot. Output lands under\n`.semia\u002Fruns\u002F\u003Cskill-slug>\u002F` by default — pass `--out \u003Cpath>` 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\u002FSemia\n```\n\nThen enable the plugin by appending to `~\u002F.codex\u002Fconfig.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 `\u002Fplugins` (plural — opens the plugin panel).\n3. Press **←** (Left) to enter **Add marketplace**.\n4. Enter `berabuddies\u002FSemia`.\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\u002FSemia\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 `\u002Fplugins` (plural — opens the plugin panel).\n3. Press **→** (Right) twice and select **Add Marketplace**.\n4. Enter `berabuddies\u002FSemia`.\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> Run Semia audit on .\u002Fsome-skill\n\nThe host agent itself acts as the synthesize step — **no API key needed**.\nThe bundled `semia.pyz` handles prepare \u002F detect \u002F report deterministically.\n\n### Fix what Semia finds\n\n```bash\nsemia repair .semia\u002Fruns\u002Fsome-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 .\u002Fsome-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:\u002F\u002Fsarifweb.azurewebsites.net\u002F)\nfor GitHub Code Scanning, or structured JSON for downstream tooling? One\nmore command:\n\n```bash\nsemia report .semia\u002Fruns\u002Fsome-skill --format sarif    # for GitHub Code Scanning\nsemia report .semia\u002Fruns\u002Fsome-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 \u002F Claude Code \u002F 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 \u002F OpenRouter \u002F vLLM\nexport OPENAI_API_KEY=sk-...\n# optional: export OPENAI_BASE_URL=https:\u002F\u002Fapi.deepseek.com\u002Fv1\n\n# Anthropic Messages API\nexport SEMIA_LLM_PROVIDER=anthropic\nexport ANTHROPIC_API_KEY=sk-ant-...\n# optional: export ANTHROPIC_BASE_URL=https:\u002F\u002Fapi.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>` 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\u002Fretry knobs, and synthesis-loop tuning.\n\n## What you get\n\nA run writes everything under `.semia\u002Fruns\u002F\u003Crun-id>\u002F`. **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>\n\u003Csummary>Other artifacts in the run directory (internal — for tooling, debugging, or re-querying)\u003C\u002Fsummary>\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\u002FSKILL.md`        | the repaired SKILL.md (when `semia repair` is run) |\n\n\u003C\u002Fdetails>\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:\u002F\u002Farxiv.org\u002Fabs\u002F2605.00314) ·\n[PDF](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2605.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\u002FarXiv.2605.00314},\n  url = {https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.00314}\n}\n```\n","Semia 是一个用于审计AI代理技能的安全工具，它能够分析技能文件中的潜在行为和影响。该项目采用Python编写，通过静态分析技术检查技能文件（如嵌入了Shell命令、网络调用等的Markdown文件），而无需实际执行这些代码，从而生成详细的、基于证据的能力报告。这使得用户能够在信任某个技能之前充分了解其可能的操作范围及其依据。Semia 适用于需要确保AI代理技能安全性的场景，比如在部署新的AI助手功能或集成第三方技能时，帮助开发者评估风险并作出明智决策。",2,"2026-06-11 03:54:48","CREATED_QUERY"]