diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b0a2dda --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,118 @@ +# AGENTS.md + +This file provides guidance to AI coding agents (Claude Code, Cursor, Copilot, etc.) when working with code in this repository. + +## Repository Overview + +A collection of skills for Claude Code and Claude.ai. Skills are packaged instructions and optional scripts that extend Claude's capabilities. + +## Skill Authoring Best Practices + +When creating or modifying skills, refer to the official best practices documentation: + +https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices + +Key principles: +- Be concise — Claude is already smart, only add context it doesn't have +- Set appropriate degrees of freedom for the task's fragility +- Test with the models you plan to use + +## Creating a New Skill + +### Directory Structure + +``` +{skill-name}/ # kebab-case directory name + SKILL.md # Required: skill definition with YAML frontmatter + scripts/ # Optional: executable scripts + {script-name}.sh # Bash scripts (preferred) + {script-name}.py # Python scripts + {supporting-files}.md # Optional: reference docs, templates, examples +``` + +### Naming Conventions + +- **Skill directory**: `kebab-case` (e.g., `audit-website-design`, `code-review`) +- **SKILL.md**: Always uppercase, always this exact filename +- **Scripts**: `kebab-case.sh` or `kebab-case.py` (e.g., `deploy.sh`, `analyze.py`) + +### SKILL.md Format + +```markdown +--- +name: {skill-name} +description: {One or two sentences describing what the skill does AND when to use it. Include trigger phrases. Max 1024 characters.} +--- + +# {Skill Title} + +{Brief description of what the skill does.} + +## How It Works / Workflow + +{Numbered list or sections explaining the skill's workflow} + +## Usage + +{Show common usage patterns and examples} + +## Output + +{Describe or show example output} +``` + +**Required frontmatter fields:** + +| Field | Requirements | +|-------|-------------| +| `name` | Max 64 chars, lowercase letters/numbers/hyphens only | +| `description` | Non-empty, max 1024 chars, third-person voice ("Extracts..." not "I extract...") | + +**Optional frontmatter fields:** + +| Field | Description | +|-------|-------------| +| `disable-model-invocation` | `true` to prevent Claude auto-triggering (manual `/name` only) | +| `user-invocable` | `false` to hide from `/` menu (background knowledge only) | +| `allowed-tools` | Space-separated tools pre-approved when skill is active | +| `argument-hint` | Hint shown in autocomplete, e.g. `[url]` or `[filename]` | +| `effort` | Reasoning effort: `low`, `medium`, `high`, `max` | +| `context` | Set to `fork` to run in a subagent | +| `agent` | Subagent type when `context: fork` (e.g., `Explore`, `Plan`) | +| `model` | Model override when skill is active | +| `paths` | Glob patterns limiting when skill activates | + +### Best Practices for Context Efficiency + +Skills are loaded on-demand — only the skill name and description are loaded at startup. The full `SKILL.md` loads into context only when the agent decides the skill is relevant. To minimize context usage: + +- **Keep SKILL.md under 500 lines** — put detailed reference material in separate files +- **Write specific descriptions** — helps the agent know exactly when to activate the skill +- **Use progressive disclosure** — reference supporting files that get read only when needed +- **Prefer scripts over inline code** — script execution doesn't consume context (only output does) +- **File references should be one level deep** — link directly from SKILL.md to supporting files, avoid chains of references + +### Script Best Practices + +- Use `#!/bin/bash` shebang and `set -e` for fail-fast behavior +- Write status messages to stderr: `echo "Message" >&2` +- Write machine-readable output (JSON) to stdout where applicable +- Include a cleanup trap for temp files +- Handle errors explicitly rather than letting Claude figure them out +- Document all constants (no "magic numbers") + +### End-User Installation + +**Claude Code (via skills.sh):** +```bash +# Install a specific skill +skills install {skill-name} +``` + +**Claude Code (manual):** +```bash +cp -r {skill-name} ~/.claude/skills/ +``` + +**Claude.ai:** +Add the skill zip to project knowledge or paste SKILL.md contents into the conversation. If the skill requires network access, add required domains at `claude.ai/settings/capabilities`. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..c4f1fdc --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +Read AGENTS.md for instructions on working with this repository. diff --git a/audit-website-design/SKILL.md b/audit-website-design/SKILL.md new file mode 100644 index 0000000..1028747 --- /dev/null +++ b/audit-website-design/SKILL.md @@ -0,0 +1,92 @@ +--- +name: audit-website-design +description: Performs a comprehensive design and technical audit of a website URL. Extracts layout, typography, colors, components, animations, spacing, tech stack, SEO metadata, and brand voice into a detailed reference document for replicating design decisions. Use when analyzing or auditing a website's design. +disable-model-invocation: true +allowed-tools: WebFetch Bash(curl *) +argument-hint: [url] +effort: high +--- + +# Website Design Audit + +Audit the website at `$ARGUMENTS` and produce a comprehensive design reference document that an engineer or LLM can use to replicate the site's design decisions. + +## Extraction strategy + +Gather data through multiple passes, then compile into the final report. + +### Pass 1: Raw HTML source + +Fetch the page source for technical and structural metadata: + +```bash +curl -sL -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "$URL" +``` + +If the output is very large, pipe through `head -1500` to capture `
` and initial ``. If curl returns a Cloudflare challenge or empty body, note this and rely more on WebFetch in Pass 3. + +Extract from HTML: +- `