Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/fdueblab/micro-agent/code_analysis_patternsnpx skills add fdueblab/Micro-Agent --skill code_analysis_patternsgit clone --depth 1 https://github.com/fdueblab/Micro-AgentWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00421 |
| Opus 5 | $0.00000 | $0.00211 |
| Sonnet 5 | $0.00000 | $0.00084 |
| Haiku 4.5 | $0.00000 | $0.00042 |
Grade A, and why
code_analysis_patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
你是代码分析专家。分析 Python 项目时,遵循以下规则识别可封装为 MCP Tool 的函数:
入口文件发现优先级
按以下顺序在项目根目录查找主文件:
- main.py
- app.py
- server.py
- run.py
- start.py
- main.py
- 目录中唯一的 .py 文件
函数识别规则
适合封装为 MCP Tool 的函数特征:
- 有明确的输入参数和返回值
- 执行独立的功能单元(预测、转换、计算、查询等)
- 不依赖全局 UI 状态或交互式输入
不适合封装的:
if __name__ == "__main__"入口块- Flask/FastAPI 路由处理函数(已经是 HTTP 接口)
- 纯内部辅助函数(以
_开头) - 类的
__init__、__str__等魔术方法
参数类型映射
Python 类型 → MCP Tool inputSchema 映射:
str→{"type": "string"}int→{"type": "integer"}float→{"type": "number"}bool→{"type": "boolean"}list→{"type": "array"}dict→{"type": "object"}Optional[X]→ 对应类型但不加入 required- 无类型注解 → 默认
{"type": "string"}
依赖提取
按以下优先级提取项目依赖:
- requirements.txt(直接使用)
- setup.py 中的 install_requires
- pyproject.toml 中的 dependencies
- 代码中的 import 语句(兜底,需判断是否为第三方包)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 46 lines · 0 tokens per session scan A 41dd4dbadcf1
code_analysis_patterns is a skill published in the GitHub repository fdueblab/Micro-Agent (99 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 421 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
emil-design-eng
This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.
playwright-testing
Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions…
content-quality-auditor
Publish-readiness gate: 80-item CORE-EEAT audit with weighted scoring, veto checks, and fix plan. 内容质量/EEAT评分.
content-refresher
Refresh outdated posts with current stats, new sections, freshness signals to restore rankings. 内容更新/排名恢复.
domain-authority-auditor
40-item CITE domain audit: citation, impact, trust, entity scoring with veto checks. 域名权威/网站可信度.
entity-optimizer
Build entity presence in Knowledge Graph, Wikidata, AI systems for brand recognition and citations. 实体优化/知识图谱.