scaffold-rules
Scaffold development rules for AI coding agents. Auto-invoked when user asks about setting up rules, coding conventions, or configuring their AI agent environment.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
Scaffold Rules
Scaffold and merge development rules adapted to different AI coding agent environments.
Purpose
Use this skill when the user wants to:
- Set up development rules or coding conventions
- Configure their AI coding agent (Claude Code, Cursor, Copilot, etc.)
- Add or update project guidelines
- Standardize conventions across a team
Supported Agents
| Agent | Config Location | Format |
|---|---|---|
| Claude Code | .claude/rules/*.md |
Separate markdown files |
| Cursor | .cursorrules or .cursor/rules/*.md |
Single or multi-file |
| GitHub Copilot | .github/copilot-instructions.md |
Single file |
| Windsurf | .windsurfrules |
Single file |
| Cline/Roo | .clinerules |
Single file |
| Aider | .aider.conf.yml |
YAML config |
Rule Categories
Bun APIs
Prefer Bun's native APIs over Node.js equivalents:
-
Bun.file()overfsAPIs -
Bun.$for shell commands -
Bun.write()for file writes -
import.meta.dirfor current directory
Git Workflow
Commit conventions and version control:
- Conventional commit prefixes:
feat:,fix:,refactor:,docs:,chore:,test: - Multi-line commit message formatting
- Agent-specific sandbox workarounds
GitHub CLI
Prefer gh CLI for GitHub operations:
- PR review and creation patterns
- Issue management
- JSON output field references
- Authentication benefits over WebFetch
TypeScript Conventions
Code style standards:
- Prefer
typeoverinterface - No
anytypes (useunknownwith type guards) - Arrow functions preferred
- Object parameter pattern for 2+ parameters
- PascalCase for types,
PascalCaseSchemasuffix for Zod schemas
Testing Patterns
Bun test runner conventions:
- Use
test()instead ofit() -
*.spec.tsfile naming - No conditionals around assertions
- Assert existence before checking values
Merge Behavior
Always scans existing rules first. When existing rules are found:
- Analyze overlap - Identify sections covering same topics
- Propose merge - Show what would be added/changed
-
User approval - Ask before modifying:
- Keep existing (skip new content)
- Merge (add missing sections)
- Replace entirely
This ensures the command never overwrites user customizations without consent.
Agent Adaptations
Content is adapted based on agent capabilities:
- Sandbox awareness: Include/exclude sandbox workarounds based on agent
- Tool references: Adjust tool names (e.g., "Bash tool" → "terminal")
- Format: Single file vs multi-file based on agent convention
- Length: Condense for agents with size limits
Usage
Run the /scaffold-rules command to interactively scaffold rules, or invoke when user asks about:
- "Set up coding conventions"
- "Configure my AI agent"
- "Add development rules"
- "What rules should I have?"
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!