Agent skill
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.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/scaffold-rules-plaited-development-skills
SKILL.md
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()overfsAPIsBun.$for shell commandsBun.write()for file writesimport.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?"
Didn't find tool you were looking for?