skills
AGENTS.md1 starsChanged 8 days agoMITView on GitHub
This document defines the architecture, operational rules, code standards, Git/release protocols, and communication conventions for any autonomous AI agent (Antigravity, Claude Code, Cursor, Kiro, OpenCode, Codex, etc.) working in this repository. This repository is an open-source suite of modular, cross-agent Agent Skills designed to augment AI coding assistants (Claude Code, Google Antigravity, Cursor, Kiro, OpenCode, Codex, etc.) across diverse software engineering domains: - Architecture & Workspace Engineering: - generate-meta-repo: Scaffolds a Manifest-based Multi-root Workspace (Meta-Repo) with repos.json, zero-dependency scripts, Makefile,…
- Commits and pushes
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 repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- figma-extractorSkill
- figma-node-builderSkill
- figma-to-codeSkill
- generate-meta-repoSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
25 rules. About 0 are common, 9 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
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
- Distinctive: line 27
Always present a summary of changes and ask for approval before running git commit.
- Very specific: line 51
Always validate package size before release: run npm run pack:check (or npm pack --dry-run) to ensure the tarball is under 100 kB (target: …
- Very specific: line 54
All scripts in scripts/ (fetch_figma.js, inspect_spec.js) must maintain zero external npm dependencies (no dependencies in node_modules).
- Very specific: line 55
Use Node.js built-in modules exclusively: fs, path, https, http, os, url, crypto.
- Very specific: line 62
All skills in this repository must strictly adhere to the Anthropic Agent Skills best practices:
- Very specific: line 70
Always in the 3rd person singular: must begin with an English present-tense verb (e.g., Extracts..., Builds..., Converts...).
- Distinctive: line 73
Must state both what the skill does and clear trigger conditions/keywords for when to activate it.
- Distinctive: line 78
Do not explain theoretical concepts LLMs already understand (e.g., how WebGL works, what flexbox is, standard bash commands).
- Very specific: line 100
Always use standard forward slashes (/) in documentation file paths and scripts, even for Windows environments.
- Very specific: line 101
Always wrap script paths in double quotes in command examples: node "<skill-dir>/scripts/fetch_figma.js".
- Very specific: line 108
Zero External Runtime Dependencies: All helper scripts in scripts/ must strictly use Node.js built-ins (fs, path, https, http, os, url, …
- Very specific: line 109
Progressive Disclosure: Keep SKILL.md body under 500 lines (recommended: 70–150 lines).
- Very specific: line 110
Cross-Platform Compatibility: Always use forward slashes (/) in documentation file paths and scripts.
- Very specific: line 119
Proactive Reuse: if .specs/<name>.json exists locally, the script reuses the local spec with 0 API calls, unless --force or -f is provided.
- Distinctive: line 120
Strict Anti-Scraping Rule: never attempt to scrape Figma URLs using Playwright, Puppeteer, or Chrome DevTools (the Figma canvas is rendered …
- Very specific: line 123
Primitive Component Reuse: when an AST node is of type INSTANCE and has an equivalent component in the host project (Button, Input, Card, …
- Very specific: line 124
Semantic Design Tokens: if the token property is present (colors/brand/primary, spacing/md, radii/lg), map it to the host theme's CSS …
- Distinctive: line 144
Never replace with naive regex that breaks on internal apostrophes.
- Distinctive: line 154
Before proposing or committing any changes:
- Distinctive: line 159
Must run and pass 100% of tests:
- Very specific: line 169
Ensure no files from demo/, test/, evals/, or test_*.js are included, and total size is < 100 kB.
- Distinctive: line 175
When publishing a new release:
- Very specific: line 189
Run gh release create vx.y.z --title "..." --notes "..." --latest with detailed markdown changelog.
- Very specific: line 200
Always create clickable links with file:///...
- Distinctive: line 202
Never assume permission to commit or push code.
≈ “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
AGENTS.md — Rules and Guidelines for AI Agents
This document defines the architecture, operational rules, code standards, Git/release protocols, and communication conventions for any autonomous AI agent (Antigravity, Claude Code, Cursor, Kiro, OpenCode, Codex, etc.) working in this repository.
1. Repository Overview (@pedroab0/skills)
This repository is an open-source suite of modular, cross-agent Agent Skills designed to augment AI coding assistants (Claude Code, Google Antigravity, Cursor, Kiro, OpenCode, Codex, etc.) across diverse software engineering domains:
- Architecture & Workspace Engineering:
generate-meta-repo: Scaffolds a Manifest-based Multi-root Workspace (Meta-Repo) withrepos.json, zero-dependency scripts,Makefile, Docker Compose dev stack,.code-workspace, and layered AI governance (AGENTS.md,CLAUDE.md).
- Design, UI & Spec-Driven Development (SDD):
figma-extractor: Specification ingestion layer. Connects to the Figma REST API, extracts a pruned AST, resolved design tokens, and normalized component instances into./.specs/<name>.json. Includes the official Figma Desktop companion plugin (Figma Node JSON Extractor) for zero-API exports.figma-node-builder: Implementation layer. Builds UI components in actual code (React, Vue, Svelte, Tailwind, etc.) from the local spec (.specs/*.json), operating 100% offline without visual hallucinations.figma-to-code: Direct one-shot converter. Single-turn conversion from Figma links into production UI components for rapid prototyping.
- Ecosystem Infrastructure & Tooling:
bin/cli.js: Interactive CLI installer (npx @pedroab0/skills) compatible with all major AI agents.evals/: Data-driven benchmark evaluation rubrics across model tiers (Haiku, Sonnet, Opus).test/: Zero-dependency test harnesses and continuous documentation parity linter (test_skills.js).
2. Strict Operational Rules (Mandatory)
A. Git and Commit Protocol
- NEVER commit without explicit user permission:
- Always present a summary of changes and ask for approval before running
git commit. The user reviews diffs manually before committing.
- Always present a summary of changes and ask for approval before running
- NEVER run
git pushor publish to npm without permission:- Running
git push, creating tags, or runningnpm publishrequires explicit and unequivocal user consent.
- Running
- Atomic Commits and Logical Separation:
- Separate changes into atomic commits by area of responsibility:
- 1st: Documentation or isolated flags (e.g., additions to
--helpand READMEs). - 2nd: Conceptual skill changes and reference files (
docs(skills)). - 3rd: CLI, agent rules, and test changes (
feat(cli)/test(cli)). - 4th: Evaluation rubrics (
test(evals)). - 5th: Isolated version bump (
chore(release)).
- 1st: Documentation or isolated flags (e.g., additions to
- Separate changes into atomic commits by area of responsibility:
- Protection of User's Local Test Files:
- Local files such as
teste.jsonor temporary specs created by the user must never be staged (git add), modified, or deleted.
- Local files such as
- Prohibition of Demo Folders in Git:
- Directories named
demo/,demos/,playground/, or sample apps inside skills must never be tracked in Git and must remain in.gitignore.
- Directories named
B. Clean and Lean npm Packaging (< 100 kB)
- The published npm tarball must contain strictly the execution code and skill documentation.
- The
"files"array inpackage.jsonmust strictly exclude:!**/demo/**!**/demos/**!**/.specs/**!**/test_*.js!**/figma-plugin/assets/**test/andevals/directories (remain only on GitHub).
- Always validate package size before release: run
npm run pack:check(ornpm pack --dry-run) to ensure the tarball is under 100 kB (target: ~72 kB with 19 files).
C. Zero External Dependencies in Scripts
- All scripts in
scripts/(fetch_figma.js,inspect_spec.js) must maintain zero external npm dependencies (no dependencies innode_modules). - Use Node.js built-in modules exclusively:
fs,path,https,http,os,url,crypto. - Maintain compatibility with Node.js
>= 16.7.0(support forfs.cpSync,fs.rmSync).
3. Skill Authoring Standards (Anthropic Agent Skills Standard)
All skills in this repository must strictly adhere to the Anthropic Agent Skills best practices:
A. Strict 3rd-Person YAML Frontmatter
namefield:- 1 to 64 characters, lowercase alphanumeric and hyphens only (
^[a-z0-9-]{1,64}$). - Prohibited reserved keywords:
"anthropic","claude".
- 1 to 64 characters, lowercase alphanumeric and hyphens only (
descriptionfield:- Max 1,024 characters. Non-empty.
- Always in the 3rd person singular: must begin with an English present-tense verb (e.g.,
Extracts...,Builds...,Converts...). - Prohibited imperative (
Extract...,Build...) and 1st/2nd person (I can...,You can...). - Prohibited XML or HTML tags (
<name>,<div>). - Must state both what the skill does and clear trigger conditions/keywords for when to activate it.
- Mandatory disambiguation: explicitly distinguish between spec planning/ingestion (
figma-extractor) and direct one-shot code generation (figma-to-code).
B. Token Budget (< 500 lines in SKILL.md)
- The context window is a public good. Keep the body of
SKILL.mdconcise (target: 70 to 110 lines). - Do not explain theoretical concepts LLMs already understand (e.g., how WebGL works, what flexbox is, standard bash commands).
- Focus on operational behavioral rules, workflows, and guardrails.
C. Progressive Disclosure
SKILL.mdis an executive high-level summary.- Dense reference materials not needed on every turn must be extracted into
REFERENCE.mdat the root of the skill:- Comprehensive CLI flag tables.
- AST JSON schemas and long output examples.
- OS-specific environment variable setup (PowerShell, Bash, Zsh) and SSL proxy guides.
- Internal rate-limit and circuit breaker mechanics.
- Maximum 1 level depth: file references from
SKILL.mdmust be at 1 level depth ([REFERENCE.md](REFERENCE.md)). - Reference files with more than 100 lines must include a
## Contentstable of contents.
D. Copyable Checklists and Bounded Feedback Loops
- Replace static diagrams with copyable operational Markdown checklists that the agent copies into its response and checks off (
- [ ] Step 1...). - Feedback Loop (Validate & Fix):
- Instruct the agent to run project integrity checks (
typecheck,tsc --noEmit, orlint) if configured in the host project. - Never install new dependencies just to run validation.
- Fix only errors in files created or modified by the agent itself.
- Report pre-existing errors in other files without attempting to refactor them.
- Instruct the agent to run project integrity checks (
E. Cross-Platform Path Compatibility
- Always use standard forward slashes (
/) in documentation file paths and scripts, even for Windows environments. - Always wrap script paths in double quotes in command examples:
node "<skill-dir>/scripts/fetch_figma.js".
4. Architecture and Code Guidelines
A. Universal Guidelines for All Agent Skills
- Zero External Runtime Dependencies: All helper scripts in
scripts/must strictly use Node.js built-ins (fs,path,https,http,os,url,crypto). Never introduce runtime dependencies inpackage.json. - Progressive Disclosure: Keep
SKILL.mdbody under 500 lines (recommended: 70–150 lines). Deep configuration tables, full schemas, and OS setup guides must reside inREFERENCE.mdat 1 level depth. - Cross-Platform Compatibility: Always use forward slashes (
/) in documentation file paths and scripts. Wrap script paths in quotes. Support UTF-8 and UTF-16LE encoding. - Deterministic Artifact Contracts: Skills producing specs, code, or workspace manifests must write only to explicit, user-designated folders (
./.specs/, target workspace directories) and never mutate external files.
B. Domain Guidelines: Design & Spec-Driven Development (SDD)
1. Zero-Hammer Protocol (Rate-Limit & Quota Protection)
- The Figma API enforces tight monthly Tier 1 rate limits on Starter plans and View seats.
- AST-only by default:
fetch_figma.jsruns without-iby default (consuming only 1 Tier 1 call). Only download PNG previews when explicitly requested by the user. - Single-Shot Execution: the script is executed exactly once per frame or component. Never retry in a loop upon errors.
- Persistent Circuit Breaker: HTTP 429 errors record the cooldown lockout in
~/.figma_ratelimit.json. Subsequent requests are blocked locally without network traffic. - Proactive Reuse: if
.specs/<name>.jsonexists locally, the script reuses the local spec with 0 API calls, unless--forceor-fis provided. - Strict Anti-Scraping Rule: never attempt to scrape Figma URLs using Playwright, Puppeteer, or Chrome DevTools (the Figma canvas is rendered via WebGL/Wasm and has no inspectable HTML DOM).
2. Anti-Div Soup and Visual Fidelity in Builder
- Primitive Component Reuse: when an AST node is of type
INSTANCEand has an equivalent component in the host project (Button,Input,Card,Badge), import and render the component directly with matching props. Never reconstruct the component out of generic styled<div>elements. - Semantic Design Tokens: if the
tokenproperty is present (colors/brand/primary,spacing/md,radii/lg), map it to the host theme's CSS variable or utility class (Tailwind). Do not hardcode arbitrary raw hex values. - Icon Resolution Hierarchy:
- Local component icon asset in
components/icons/,src/assets/,public/. - Installed icon library in
package.json(lucide-react,@heroicons/react, etc.). - Accessible semantic placeholder (
<span aria-hidden="true" />) with commentTODO: Missing icon 'name'. Never hallucinate complex SVG<path d="...">coordinates.
- Local component icon asset in
- Image Layers: style the container only (
width,height,rounded,object-coverforscaleMode: FILL) and render<img src="" alt="..." />with aTODOcomment. Never invent external image URLs (e.g. Unsplash placeholders).
C. Domain Guidelines: Architecture & Workspace Engineering
- Zero-Dependency Orchestration: Scaffolding scripts generated by
generate-meta-repomust execute natively in standard POSIX shells (sh,bash,zsh) and Windows (cmd,PowerShell) without third-party workspace managers. - Manifest as Single Source of Truth: The workspace must be anchored by
repos.json, declaring git clone URLs, target paths, branches, and cross-repo dependencies. - Layered AI Governance: Workspace generators must establish hierarchical rules: a root
AGENTS.md/CLAUDE.mdgoverning cross-repo boundaries, and sub-repo rules governing domain-specific code.
5. Installer Integration & Agent Rules (bin/cli.js)
- Frontmatter Parser:
bin/cli.jsusesparseFrontmatterField(content, field)supporting:- YAML-escaped single quotes (
''). - JSON-escaped double quotes (
\"). - Unquoted plain strings.
- Never replace with naive regex that breaks on internal apostrophes.
- YAML-escaped single quotes (
- Cursor Rules (
.mdc):- Rules generated in
.cursor/rules/<skill>.mdcmust setalwaysApply: false(Agent Requested mode) to prevent attaching skill prompts to unrelated files. - The
descriptionfield must be serialized withJSON.stringify. - Markdown relative links must be automatically rewritten by
rewriteRelativeLinksForCursorto](../skills/<skill>/<file>.md).
- Rules generated in
6. Testing, Quality & Continuous Validation
Before proposing or committing any changes:
- Run the test suite:
Must run and pass 100% of tests:npm testfigma-extractor/scripts/test_fetch_figma.js(parsing, circuit breaker, AST, and plugin tests).figma-to-code/scripts/test_fetch_figma.js(direct extraction tests).figma-node-builder/scripts/test_inspect_spec.js(spec inspector tests).test/test_cli.js(cross-agent installer, frontmatter parser, and Cursor rules tests).test/test_skills.js(continuous best practices linter and 100% CLI flag parity check).
- Validate npm package integrity:
Ensure no files fromnpm run pack:checkdemo/,test/,evals/, ortest_*.jsare included, and total size is < 100 kB.
7. Standard Release Procedure
When publishing a new release:
- Version Definition (SemVer):
- Patch (
1.x.y): Bug fixes, documentation adjustments. - Minor (
1.y.0): New flags, AST optimizations, compatibility improvements.
- Patch (
- Update
package.json:- Bump
"version". - Commit:
git commit -m "chore(release): bump version to x.y.z".
- Bump
- Create Git Tag:
git tag -a vx.y.z -m "vx.y.z"
- Push to Remote:
git push origin main --tags
- Publish to npm:
npm publish(user enters OTP if required).
- Create GitHub Release (
gh):- Run
gh release create vx.y.z --title "..." --notes "..." --latestwith detailed markdown changelog.
- Run
8. Communication Style and Language Conventions
- Repository Language:
- All files tracked in the repository MUST be written in English: code, documentation, Markdown files, scripts, comments, commit messages, PR descriptions, and agent configuration files (
AGENTS.md,CLAUDE.md,.cursorrules, etc.).
- All files tracked in the repository MUST be written in English: code, documentation, Markdown files, scripts, comments, commit messages, PR descriptions, and agent configuration files (
- Tone & Format:
- Concise, structured, and direct GitHub-flavored Markdown.
- Mandatory Clickable Links:
- Always create clickable links with
file:///...for all referenced files and directories (e.g.,package.json).
- Always create clickable links with
- Transparency & Confirmation:
- Never assume permission to commit or push code. Explain what was changed, present test/packaging diagnostics, and await explicit instructions to proceed.
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.

