ai-devstudio
AGENTS.md1 starsChanged 7 months agoMITView on GitHub
This software is released under the MIT License. https://opensource.org/licenses/MIT --> This document provides guidelines for AI assistants (particularly Claude Code) when working with the AI DevStudio project. It ensures consistent, safe, and effective collaboration between human developers and AI agents. AI DevStudio is a professional development environment that extends Claude Code CLI with 150 professional skills across 4 tiers for automated workflows, code quality analysis, and session management. Core Philosophy: Time-saving automation with safety-first design and professional-grade code quality. Format:…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository206 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- project-healthSkill
- skill-validatorSkill
- accessibilitySkill
- agent-debugSkill
- agent-evaluateSkill
- ai-governanceSkill
- ai-system-reviewSkill
- api-docs-generateSkill
- api-examplesSkill
- api-mockSkill
- api-test-generateSkill
- api-validateSkill
- architecture-diagramSkill
- ask-mattSkill
- assumption-mapSkill
- boilerplateSkill
- brainstormSkill
- branch-finishSkill
- briefingSkill
- browser-testing-with-devtoolsSkill
- bundle-analyzeSkill
- cache-strategySkill
- canarySkill
- carefulSkill
- cavemanSkill
- changelog-autoSkill
- chaos-testSkill
- ci-setupSkill
- ci-sweepSkill
- cleanprojectSkill
- click-path-auditSkill
- codebase-designSkill
- code-review-checklistSkill
- code-tourSkill
- commitSkill
- completion-verifySkill
- complexity-reduceSkill
- component-librarySkill
- config-cleanupSkill
- config-generateSkill
- conflict-resolveSkill
- container-optimizeSkill
- context-budgetSkill
- context-engineeringSkill
- context-restoreSkill
- context-saveSkill
- continuous-learningSkill
- contributingSkill
- cost-trackSkill
- councilSkill
- create-todosSkill
- cross-modal-reviewSkill
- database-connectSkill
- db-diagramSkill
- ddd-modelSkill
- debug-root-causeSkill
- debug-sessionSkill
- debug-systematicSkill
- decision-logSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
75 rules. About 2 are common, 57 are distinctive, and 16 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈57
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 20
Format: All skills follow the official Claude Skills format with YAML frontmatter and the Agent Skills open standard.
- Common: line 26
ABSOLUTE REQUIREMENT: Never use Claude or AI credentials for git commits.
- Distinctive: line 37
Always read files before editing or writing
- Distinctive: line 38
Use Edit tool for existing files, Write tool only for genuinely new files
- Distinctive: line 40
Never create unnecessary documentation files unless explicitly requested
- Very specific: line 44
All skills are in the skills/ directory, each in its own subdirectory
- Distinctive: line 47
Test skills thoroughly before marking as complete
- Distinctive: line 48
Follow the official Claude Skills format structure
- Very specific: line 54
Reading Skills: Use Read tool to examine skills/skill-name/SKILL.md files
- Very specific: line 56
Create directory in skills/skill-name/
- Very specific: line 57
Create SKILL.md with proper YAML frontmatter
- Distinctive: line 58
Follow the template structure from existing skills
- Distinctive: line 59
Testing Skills: Verify skill syntax and behavior before committing
- Distinctive: line 60
Documentation: Update README.md and CLAUDE.md when adding/modifying skills
- Distinctive: line 68
Test installation on multiple platforms when possible
- Very specific: line 70
Verify dynamic discovery works after adding a new skill: ls skills/<new-skill>/SKILL.md
- Very specific: line 76
Must integrate with .claude/sessions/ directory structure
- Distinctive: line 77
Should preserve full context and history
- Distinctive: line 78
Must handle edge cases (no active session, corrupt session files, etc.)
- Very specific: line 79
Follow the patterns established in docs/session-management/sessions.md
- Distinctive: line 85
Python: Follow PEP 8, use type hints where beneficial
- Distinctive: line 86
Shell Scripts: Use shellcheck-compliant syntax
- Distinctive: line 87
Markdown: Use consistent formatting, proper headers, code blocks
- Distinctive: line 92
Keep README.md as the primary user-facing documentation
- Distinctive: line 93
Use CLAUDE.md for project context and memory
- Distinctive: line 94
Use AGENTS.md (this file) for AI interaction guidelines
- Distinctive: line 95
Update CONTRIBUTING.md for contributor workflows
- Distinctive: line 100
Verify command behavior with Claude Code CLI
- Distinctive: line 101
Test edge cases and error handling
- Distinctive: line 102
Ensure backwards compatibility when modifying existing commands
- Very specific: line 157
Use kebab-case: session-start, fix-todos, security-scan
- Distinctive: line 159
Follow established patterns in the skill family
- Distinctive: line 160
Avoid abbreviations unless universally understood
- Distinctive: line 175
Use git checkpoints for safety before destructive operations
- Distinctive: line 202
Ask for explicit confirmation
- Distinctive: line 244
Technical: Use precise technical terminology
- Distinctive: line 250
When clarification is needed:
- Distinctive: line 252
Ask specific, focused questions
- Distinctive: line 255
Don't ask questions with obvious answers
- Distinctive: line 259
When multiple approaches are valid:
- Distinctive: line 270
Update command descriptions when behavior changes
- Distinctive: line 272
Keep documentation current with codebase
- Distinctive: line 273
Test commands with new Claude Code CLI versions
- Distinctive: line 278
Use conventional commit messages
- Distinctive: line 279
Keep commits focused and atomic
- Distinctive: line 280
Write clear commit messages explaining "why"
- Distinctive: line 285
Update version numbers consistently
- Distinctive: line 286
Update CHANGELOG.md with changes
- Distinctive: line 287
Test installation on all supported platforms
- Distinctive: line 288
Verify all commands work with current Claude Code version
- Very specific: line 295
Use /security-scan command for vulnerability detection
- Common: line 296
Never commit sensitive data (API keys, passwords, credentials)
- Distinctive: line 303
Never share session data without explicit permission
- Distinctive: line 305
Don't expose internal implementation details unnecessarily
- Very specific: line 311
Create new directory: skills/new-skill-name/
- Distinctive: line 315
Add other frontmatter fields as needed
- Distinctive: line 316
Add skill markdown content following established patterns
- Distinctive: line 317
Test thoroughly with various scenarios
- Very specific: line 318
Update installation scripts to include new skill (install.sh uses dynamic discovery — no manual array update needed.
- Distinctive: line 319
Document in README.md and CLAUDE.md (update skill count)
- Distinctive: line 320
Update this file if new patterns are introduced
- Distinctive: line 324
Read and understand current implementation
- Distinctive: line 327
Test all documented use cases
- Distinctive: line 328
Update documentation if behavior changes
- Distinctive: line 329
Consider impact on dependent skills
- Distinctive: line 333
When adding framework-specific features:
- Distinctive: line 335
Keep core commands framework-agnostic
- Distinctive: line 336
Create separate commands for framework-specific functionality
- Distinctive: line 339
Document framework requirements clearly
- Very specific: line 388
Use context: fork in YAML frontmatter to run a skill in an isolated subagent:
- Very specific: line 403
Create worktrees for each workstream: git worktree add ../feature-a feature-a
- Very specific: line 406
Use the Task tool (not Bash) for inter-agent communication
- Very specific: line 415
Never call Bash(git commit) from an agent — surface to user via Task output
- Distinctive: line 484
Safety Ensured: No accidental data loss or corruption
- Distinctive: line 485
Standards Followed: All guidelines in this document are followed
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Copyright (c) 2025 Manas Talukdar
This software is released under the MIT License.
https://opensource.org/licenses/MIT
-->AGENTS.md - AI Agent Guidelines for AI DevStudio
Purpose
This document provides guidelines for AI assistants (particularly Claude Code) when working with the AI DevStudio project. It ensures consistent, safe, and effective collaboration between human developers and AI agents.
Project Identity
AI DevStudio is a professional development environment that extends Claude Code CLI with 150 professional skills across 4 tiers for automated workflows, code quality analysis, and session management.
Core Philosophy: Time-saving automation with safety-first design and professional-grade code quality.
Format: All skills follow the official Claude Skills format with YAML frontmatter and the Agent Skills open standard. Each skill resides in skills/skill-name/SKILL.md.
Critical Safety Rules
1. Git Credentials and Commits
ABSOLUTE REQUIREMENT: Never use Claude or AI credentials for git commits.
- ✅ CORRECT: All commits must use the developer's configured git credentials
- ❌ NEVER: Use "Claude Sonnet 4.5 noreply@anthropic.com" or any AI identity
- ❌ NEVER: Include "Co-Authored-By: Claude" or similar AI attribution in commits
- ❌ NEVER: Modify git config to set AI credentials
Rationale: Commits represent legal authorship and accountability. AI assistants are tools, not authors.
2. File Operations
- Always read files before editing or writing
- Use Edit tool for existing files, Write tool only for genuinely new files
- Preserve existing code style, formatting, and conventions
- Never create unnecessary documentation files unless explicitly requested
3. Skill Development
- All skills are in the
skills/directory, each in its own subdirectory - Each skill has a
SKILL.mdfile (uppercase) with YAML frontmatter - Skills must be self-contained with clear instructions
- Test skills thoroughly before marking as complete
- Follow the official Claude Skills format structure
Development Workflows
Working with Skills
- Reading Skills: Use
Readtool to examineskills/skill-name/SKILL.mdfiles - Creating Skills:
- Create directory in
skills/skill-name/ - Create
SKILL.mdwith proper YAML frontmatter - Follow the template structure from existing skills
- Create directory in
- Testing Skills: Verify skill syntax and behavior before committing
- Documentation: Update README.md and CLAUDE.md when adding/modifying skills
Installation Scripts
install.pyandinstall.shmust be kept in syncuninstall.pyanduninstall.shmust be kept in sync- Installation copies from
skills/to~/.claude/skills/ - Uninstallation removes from
~/.claude/skills/(and legacy~/.claude/commands/if present) - Test installation on multiple platforms when possible
install.shanduninstall.shuse dynamic discovery via the GitHub API — no manual array update needed when adding new skills- Verify dynamic discovery works after adding a new skill:
ls skills/<new-skill>/SKILL.md
Session Management
Skills in the session-* family require special attention:
- Must integrate with
.claude/sessions/directory structure - Should preserve full context and history
- Must handle edge cases (no active session, corrupt session files, etc.)
- Follow the patterns established in
docs/session-management/sessions.md
Code Quality Standards
Style and Formatting
- Python: Follow PEP 8, use type hints where beneficial
- Shell Scripts: Use shellcheck-compliant syntax
- Markdown: Use consistent formatting, proper headers, code blocks
- Commands: Clear structure with purpose, usage, examples, and edge cases
Documentation
- Keep README.md as the primary user-facing documentation
- Use CLAUDE.md for project context and memory
- Use AGENTS.md (this file) for AI interaction guidelines
- Update CONTRIBUTING.md for contributor workflows
Testing
- Manually test installation scripts on supported platforms
- Verify command behavior with Claude Code CLI
- Test edge cases and error handling
- Ensure backwards compatibility when modifying existing commands
Skill Development Guidelines
Skill Structure
Each skill must be in its own directory with a SKILL.md file (uppercase) that includes YAML frontmatter followed by markdown content:
---
name: skill-name
description: Clear description of what it does and when to use it
disable-model-invocation: false # true for manual-only skills
---
# Skill Name
## Purpose
Clear one-line description
## Usage
How to invoke the skill
## Behavior
Step-by-step process
## Examples
Real-world use cases
## Edge Cases
How to handle errors and unusual situations
## Safety Considerations
Any risks or precautionsYAML Frontmatter Fields:
name: Skill name (lowercase, hyphens, max 64 chars)description: What it does and when to use it (helps Claude decide when to invoke)disable-model-invocation: Set totruefor manual-only skills (side effects, user control)user-invocable: Set tofalseto hide from menu (default:true)allowed-tools: Optional - restrict which tools Claude can usecontext: Set toforkto run in subagentagent: Subagent type when usingcontext: fork
Skill Categories
- Development Workflow: Automate repetitive tasks
- Code Quality & Security: Analysis and improvement
- Advanced Analysis: Deep understanding and explanation
- Session & Project Management: Context preservation and collaboration
Skill Naming
- Use kebab-case:
session-start,fix-todos,security-scan - Be descriptive but concise
- Follow established patterns in the skill family
- Avoid abbreviations unless universally understood
Integration Points
Claude Code CLI
- Skills are invoked via
/skill-namesyntax (Claude Skills) - Skills receive context from Claude Code conversation history
- Skills can use Claude Code's built-in tools (Read, Write, Edit, Bash, etc.)
- Skills should be autonomous and minimize user interaction
Git Integration
- Skills may read git status and history
- Skills should never commit without explicit user request
- Use git checkpoints for safety before destructive operations
- Respect user's git configuration and credentials
File System
- Primary workspace: Project root directory
- Session data:
.claude/sessions/directory - Skill definitions:
skills/directory (each skill inskills/skill-name/SKILL.md) - Installation target:
~/.claude/skills/(user-specific, personal skills) or.claude/skills/(project-specific)
Common Patterns
Error Handling
If [error condition]:
1. Inform user of the issue
2. Provide clear error message
3. Suggest corrective action
4. Exit gracefully without making changesUser Confirmation
For destructive operations:
- Explain what will happen
- Ask for explicit confirmation
- Provide option to preview changes
- Allow user to cancel
Progress Feedback
For long-running operations:
- Show clear progress indicators
- Provide intermediate status updates
- Estimate completion when possible
- Allow interruption/cancellation
Anti-Patterns to Avoid
Never Do These
- ❌ Use AI credentials for git operations
- ❌ Commit code without explicit user request
- ❌ Make destructive changes without checkpoints
- ❌ Skip reading files before editing them
- ❌ Create unnecessary documentation files
- ❌ Add AI attribution to any generated content
- ❌ Override user's git configuration
- ❌ Modify files outside the project directory without permission
- ❌ Execute commands that could cause data loss without confirmation
- ❌ Hardcode paths or assume specific directory structures
Discouraged Practices
- Creating new files when editing existing ones would suffice
- Over-engineering simple solutions
- Adding unnecessary abstractions
- Verbose explanations when concise ones work
- Using emoji in commits or generated code
- Adding comments to self-explanatory code
Collaboration with Developers
Communication Style
- Concise: Developers prefer brevity over verbosity
- Technical: Use precise technical terminology
- Action-Oriented: Focus on what needs to be done
- Evidence-Based: Reference specific files and line numbers
Asking Questions
When clarification is needed:
- Ask specific, focused questions
- Provide context for why the information is needed
- Suggest reasonable defaults when applicable
- Don't ask questions with obvious answers
Providing Options
When multiple approaches are valid:
- Present 2-3 viable options
- Explain trade-offs clearly
- Recommend the best option with rationale
- Let the developer make the final decision
Project Maintenance
Regular Tasks
- Update command descriptions when behavior changes
- Sync installation scripts with new commands
- Keep documentation current with codebase
- Test commands with new Claude Code CLI versions
- Review and close obsolete issues/TODOs
Version Control
- Use conventional commit messages
- Keep commits focused and atomic
- Write clear commit messages explaining "why"
- Reference issues/PRs when applicable
Release Process
- Update version numbers consistently
- Update CHANGELOG.md with changes
- Test installation on all supported platforms
- Verify all commands work with current Claude Code version
- Tag releases with semantic versioning
Security Considerations
Code Scanning
- Use
/security-scancommand for vulnerability detection - Never commit sensitive data (API keys, passwords, credentials)
- Be cautious with file operations outside project directory
- Validate user input in command implementations
Privacy
- Session data may contain sensitive project information
- Never share session data without explicit permission
- Respect
.gitignorepatterns - Don't expose internal implementation details unnecessarily
Extension and Customization
Adding New Skills
- Create new directory:
skills/new-skill-name/ - Create
SKILL.mdwith proper YAML frontmatter:- Set appropriate
nameanddescription - Choose correct
disable-model-invocationsetting - Add other frontmatter fields as needed
- Set appropriate
- Add skill markdown content following established patterns
- Test thoroughly with various scenarios
- Update installation scripts to include new skill (
install.shuses dynamic discovery — no manual array update needed; verifyskills/<name>/SKILL.mdexists) - Document in README.md and CLAUDE.md (update skill count)
- Update this file if new patterns are introduced
Modifying Existing Skills
- Read and understand current implementation
- Identify specific changes needed
- Maintain backwards compatibility when possible
- Test all documented use cases
- Update documentation if behavior changes
- Consider impact on dependent skills
Framework-Specific Extensions
When adding framework-specific features:
- Keep core commands framework-agnostic
- Create separate commands for framework-specific functionality
- Auto-detect framework when possible
- Gracefully handle absence of framework
- Document framework requirements clearly
Subagent Orchestration Patterns
Three-Tier Architecture
AI DevStudio uses a Command → Agent → Skill hierarchy:
- Commands (
.claude/commands/): High-level orchestrators. Invoke agents and skills, manage user interaction, aggregate results. - Agents (
.claude/agents/): Specialized workers with restricted tool sets and preloaded skills. Run in isolated context. - Skills (
skills/or.claude/skills/): Atomic capability units. User-invocable or agent-consumed.
See /architecture:agent-command-system for a full mid-session reference.
Current Agents
| Agent | Model | Purpose |
code-reviewer | sonnet | Read-only code quality analysis |
security-auditor | sonnet | Vulnerability scanning, OWASP, secrets detection |
test-runner | sonnet | Test execution, failure analysis, TDD enforcement |
claude-md-auditor | opus | Documentation drift detection and repair (CLAUDE.md, AGENTS.md, README.md) |
quality-fixer | sonnet | Iterative lint/shellcheck/type fix cycles (max 5 iterations) |
Persistent Agent Memory
Each agent accumulates institutional knowledge across conversations via a memory directory:
.claude/agent-memory/
claude-md-auditor/MEMORY.md
code-reviewer/MEMORY.md
security-auditor/MEMORY.md
test-runner/MEMORY.md
quality-fixer/MEMORY.mdAgents read their MEMORY.md at the start of each invocation and append new findings after completion.
Architecture Reference Commands
| Command | Purpose |
/architecture:skill-system | Skill tiers, YAML fields, naming, token budgets |
/architecture:hook-events | All 19 hook events, settings structure, compact reminder |
/architecture:agent-command-system | Command/Agent/Skill hierarchy, agent table, memory system |
Running Skills in Subagents
Use context: fork in YAML frontmatter to run a skill in an isolated subagent:
---
name: my-skill
description: Runs in a subagent
context: fork
agent: general
---Parallel Agent Pattern (Boris Cherny Workflow)
For independent parallel workstreams, use git worktrees + tmux:
- Create worktrees for each workstream:
git worktree add ../feature-a feature-a - Launch agents in separate tmux panes, each in their worktree
- Agents communicate via shared state in
.claude/sessions/— never via direct bash IPC - Use the
Tasktool (notBash) for inter-agent communication - Merge results when all agents complete
Implemented by the /parallel-agents skill.
Agent Design Rules
- Restrict tools to minimum required (e.g., read-only agents get
Read,Grep,Globonly) - Preload relevant skills via
preloadedSkillsfrontmatter - Never call
Bash(git commit)from an agent — surface to user via Task output - Agent-level self-evolution: agents may update their own skill files after execution to improve future runs
Hooks System
Claude Code supports 19 hook events that trigger shell commands at lifecycle points.
All 19 Hook Events
| Event | Trigger | once |
PreToolUse | Before any tool call | No |
PostToolUse | After successful tool call | No |
PostToolUseFailure | After failed tool call | No |
PermissionRequest | When Claude requests permission | No |
UserPromptSubmit | When user submits a message | No |
Notification | On notification events | No |
Stop | When Claude stops responding | No |
SubagentStart | When a subagent starts | No |
SubagentStop | When a subagent stops | No |
PreCompact | Before context compaction | Yes |
SessionStart | When a session begins | Yes |
SessionEnd | When a session ends | Yes |
Setup | On initial setup | Yes |
TeammateIdle | When a teammate goes idle | No |
TaskCompleted | When a task completes | No |
ConfigChange | On configuration change | No |
WorktreeCreate | When a worktree is created | No |
WorktreeRemove | When a worktree is removed | No |
InstructionsLoaded | When instructions are loaded | No |
Hook Configuration
Hooks are defined in .claude/settings.json under the hooks key:
"hooks": {
"PreToolUse": [{ "hooks": [{ "type": "command", "command": "python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py", "timeout": 5000, "async": true }] }],
"SessionStart": [{ "hooks": [{ "type": "command", "command": "...", "timeout": 5000, "async": true, "once": true }] }]
}Agent-Level Hooks
Agents can define their own hooks in YAML frontmatter:
hooks:
PostToolUse:
- type: command
command: echo "Tool used" >> .claude/hooks/hooks-log.jsonlDevStudio Hooks Script
.claude/hooks/scripts/hooks.py handles all 19 events with:
- Platform-aware audio notifications (afplay/paplay/aplay/winsound)
- JSONL logging to
.claude/hooks/hooks-log.jsonl --agent=<name>argument for agent-specific sound mapping- Graceful degradation when no audio player is available
Success Metrics
A successful interaction with AI DevStudio:
- Time Saved: Automates repetitive tasks effectively
- Quality Maintained: Code quality matches or exceeds manual work
- Context Preserved: Session continuity across conversations
- Safety Ensured: No accidental data loss or corruption
- Standards Followed: All guidelines in this document are followed
Resources
- Main Documentation: README.md
- Project Context: CLAUDE.md
- Contribution Guidelines: CONTRIBUTING.md
- Auto-Loaded Rules:
.claude/rules/(skill-development, git-workflow, code-quality, token-optimization) - Token Optimization Guide: TOKEN_OPTIMIZATION_GUIDE.md
- Session System: docs/session-management/sessions.md
- Hooks System:
.claude/hooks/README.md - Migration Documentation: docs/migration/MIGRATION-PLAN.md
- License: LICENSE (MIT)
Revision History
- 2025-01-25: Initial creation with comprehensive AI agent guidelines
- Added critical safety rules for git credentials
- Documented command development patterns
- Established code quality standards
- Defined anti-patterns and best practices
Remember: AI DevStudio is a tool to enhance developer productivity. Always prioritize the developer's needs, maintain code quality, and follow safety-first principles.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

