code_analysis_patterns

code_analysis_patterns is a skill for Claude Code, Codex from fdueblab/Micro-Agent. It costs 0 tokens per session (438 once invoked), scanned A, original, MIT.

Rules for analysing Python projects and identifying functions that could become MCP tools, which are callable functions exposed to an AI system.

In plain words
What is it for?
Use it to inspect project entry files, recognise tool-ready functions, exclude internal helpers and framework routes, and extract dependencies from common Python project files.
Why use it?
It gives a consistent way to find the main file, select self-contained functions, map Python types to tool inputs, and avoid unsuitable entry points or web routes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect project entry files, recognise tool-ready functions, exclude internal helpers and framework routes, and extract dependencies from common Python project files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fdueblab/micro-agent/code_analysis_patterns
Install

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.

Any agent
npx skills add fdueblab/Micro-Agent --skill code_analysis_patterns
Clone the repo
git clone --depth 1 https://github.com/fdueblab/Micro-Agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code_analysis_patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/fdueblab/micro-agent/code_analysis_patterns/github.svg)](https://agentmods.dev/skills/fdueblab/micro-agent/code_analysis_patterns)
Your own site
<a href="https://agentmods.dev/skills/fdueblab/micro-agent/code_analysis_patterns"><img src="https://agentmods.dev/badge/skills/fdueblab/micro-agent/code_analysis_patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code_analysis_patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/fdueblab/micro-agent/code_analysis_patterns"><img src="https://agentmods.dev/badge/skills/fdueblab/micro-agent/code_analysis_patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 438 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00438
Opus 5.5 $0.00000 $0.00175
Sonnet 5.5 $0.00000 $0.00088
Haiku 4.5 $0.00000 $0.00044

Measured 22d ago against content hash c429232016d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 22d 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.

workspace/skills/code_analysis_patterns/SKILL.md · 46 lines

What it actually says

你是代码分析专家。分析 Python 项目时,遵循以下规则识别可封装为 MCP Tool 的函数:

入口文件发现优先级

按以下顺序在项目根目录查找主文件:

  1. main.py
  2. app.py
  3. server.py
  4. run.py
  5. start.py
  6. main.py
  7. 目录中唯一的 .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"}

依赖提取

按以下优先级提取项目依赖:

  1. requirements.txt(直接使用)
  2. setup.py 中的 install_requires
  3. pyproject.toml 中的 dependencies
  4. 代码中的 import 语句(兜底,需判断是否为第三方包)
Changes

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.

  1. 22d ago Changed c429232016d3
  2. 1mo ago First seen · 46 lines · 0 tokens per session scan A 41dd4dbadcf1

Subscribe to this mod's changes

code_analysis_patterns is a skill published in the GitHub repository fdueblab/Micro-Agent (101 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 438 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.

Related

Other skills, from other repositories

vandalizer-api

Talk to the Vandalizer Management API — /api/mgmt/v1. Use when the user says "/vandalizer-api", asks to query the management API, pastes a vklive… key, asks to check Vandalizer dev/prod stats, validation runs, workflows, audit log, or wants to run a workflow/validation/extraction via the management surface.

ui-insight/vandalizer · 84 tokens

mem0-status

Diagnoses mem0 connectivity, API key validity, and memory read/write functionality. Use when memory operations fail, searches return empty, addmemory errors occur, or to verify the plugin is working correctly.

mem0ai/mem0 · 44 tokens

status

Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken.

mem0ai/mem0 · 54 tokens

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…

mem0ai/mem0 · 207 tokens

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

browserwing-executor

Control browser automation through HTTP API. Supports page navigation, element interaction (click, type, select), data extraction, accessibility snapshot analysis, screenshot, JavaScript execution, and batch operations.

MemTensor/MemOS · 42 tokens