agent-development
Guidelines for developing pydantic-ai agents, tools, and handlers
Install / Use
npx skills add divar-ir/ai-doc-genInstalls into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of agent-development
agent-development scores 81/100 on our quality scale, 743rd of 968 AI & Machine Learning skills we index.
Its Cursor Rules is 2.9 KB long, split into 6 sections with 2 code examples: a solid amount of guidance for an agent.
It has 763 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so agent-development is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
agent-development compared with similar skills
All 4 of these similar skills score higher than agent-development; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| agent-development (this skill)by divar-ir | 81 | 763 | 3mo ago | Cursor Rules |
| claude-memby thedotmack | 100 | 97.1k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 92.6k | 21d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 85.4k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.5k | today | CLAUDE.md |
Frequently asked questions
- How do I install agent-development?
- Run
npx skills add divar-ir/ai-doc-gen. The install tabs above show the steps for each supported agent. - Which AI agents does agent-development work with?
- It is written for Cursor, as a Cursor Rules file. Other agents that read the same format can often use it too.
- Is agent-development safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is agent-development still maintained?
- The repository was last updated about 3 months ago, so agent-development is actively maintained.
Skill content
View source on GitHubdescription: Guidelines for developing pydantic-ai agents, tools, and handlers globs:
- "src/agents/**/*.py"
- "src/handlers/**/*.py" alwaysApply: false
Agent Development
Agent construction
Agents are built as properties on coordinator classes (AnalyzerAgent, DocumenterAgent, AIRulesGeneratorAgent):
@property
def _structure_analyzer_agent(self) -> Agent:
model, model_settings = self._llm_model
return Agent(
name="Structure Analyzer",
model=model,
model_settings=model_settings,
system_prompt=self._render_prompt("agents.structure_analyzer.system_prompt"),
tools=[FileReadTool().get_tool(), ListFilesTool().get_tool()],
retries=config.ANALYZER_AGENT_RETRIES,
)
- Model setup is OpenAI-compatible only:
OpenAIChatModel(model_name, provider=OpenAIProvider(base_url=..., api_key=..., http_client=create_retrying_client())). There is no Gemini/custom provider path. ModelSettings: temperature 0.0,max_tokens,timeout,parallel_tool_calls— all fromsrc/config.pyenv constants.
Prompts
- Jinja2 templates in YAML under
src/agents/prompts/(keys likeagents.<name>.system_prompt/user_prompt), loaded byPromptManagerand rendered viaself._render_prompt(key)withrepo_pathetc. as variables. - New agent → new prompt section in the matching YAML file, never inline prompt strings in Python.
Orchestration
- Analyzer: build a dict of task callables (one per non-excluded analysis), run through
WorkerPool(max_workers=self._config.max_workers). - AI-rules generator: fixed pair of tasks via
asyncio.gather(*tasks, return_exceptions=True). - After the run,
validate_succession(files): raiseValueErroronly if NO output file exists; warn on partial success listing missing files. - Each agent writes its own output file (
.ai/docs/*.md, README.md, CLAUDE.md/AGENTS.md,.cursor/rules/*.mdc); create parent dirs and clean absolute paths first.
Tools
class FileReadTool:
def get_tool(self):
return Tool(self._run, name="Read-File", takes_ctx=False, max_retries=...)
def _run(self, file_path: str, line_number: int = 0, line_count: int = 200) -> str:
"""Docstring is the LLM-facing description — keep Args/Returns accurate."""
...
raise ModelRetry(message="File not found") # recoverable errors → ModelRetry
- Tool docstrings are what the LLM sees; keep them precise.
- Raise
ModelRetryfor recoverable failures (missing file, permission denied); set span attributes for inputs/outputs; log withLogger.debug.
Handlers
- Subclass
AbstractHandler, config =BaseHandlerConfig+ agent config, construct the agent in__init__, and wraphandle()work in an OpenTelemetry span withrepo_path/config-flag attributes. - Log token usage (
result.usage().total_tokens) and execution time after each agent run.
Related Skills
claude-mem
97.1kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
92.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
85.4kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
