worked-examples
БесплатноБез исполняемых скриптовНе проверенStep-by-step tutorials and worked examples for common Claude Code workflows — setup, debugging, code review, agent teams, hooks, memory, optimization, and CI/CD
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Worked Examples & Tutorials
Step-by-step walkthroughs of real Claude Code workflows. Each tutorial shows the exact commands, expected output, and decision points.
Tutorial 1: Set Up Claude Code for a New Project
Goal: Configure Claude Code from scratch for a TypeScript/React project.
Steps:
- Generate starter CLAUDE.md
/init
Claude analyzes your codebase and generates CLAUDE.md with build commands, test instructions, and detected conventions.
- Review and customize CLAUDE.md Open the generated file. Keep it under 200 lines. Focus on:
- Build/test commands:
pnpm install,pnpm test,npx tsc --noEmit - Coding standards: "Use 2-space indentation", "Prefer named exports"
- Architecture notes: "API routes in src/api/, components in src/components/"
- Create path-scoped rules
mkdir -p .claude/rules
Create code-style.md with paths frontmatter for **/*.ts, **/*.tsx.
Create testing.md with paths frontmatter for **/*.test.*.
- Configure MCP servers
/cc-mcp add context7 # Library documentation
/cc-mcp add perplexity # Web research
- Set up hooks
/cc-hooks create auto-format # Format on file write
/cc-hooks create security-guard # Block dangerous commands
- Validate configuration
/cc-setup --audit
Check the audit score. Fix any warnings.
Expected outcome: Audit score > 80, all checks green.
Tutorial 2: Build a Pre-Commit Security Hook
Goal: Create a hook that blocks commits containing secrets.
Steps:
- Create the hook script
Create
.claude/hooks/scripts/secret-scanner.sh:
#!/usr/bin/env bash
set -euo pipefail
input=$(cat)
tool_name=$(echo "$input" | jq -r '.tool_name // empty')
if "$tool_name" != "Bash"; then
echo '{"decision":"passthrough"}'
exit 0
fi
command=$(echo "$input" | jq -r '.tool_input.command // empty')
# Block git commits that might contain secrets
if echo "$command" | grep -qE 'git (add|commit)'; then
# Check staged files for secret patterns
if git diff --cached --name-only 2>/dev/null | xargs grep -lE '(API_KEY|SECRET|PASSWORD|TOKEN)=[^$]' 2>/dev/null; then
echo '{"decision":"block","reason":"Staged files contain potential secrets. Remove them before committing."}'
exit 0
fi
fi
echo '{"decision":"passthrough"}'
- Make it executable
chmod +x .claude/hooks/scripts/secret-scanner.sh
- Register in settings.json
Add to
.claude/settings.jsonunderhooks.PreToolUse:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"command": ".claude/hooks/scripts/secret-scanner.sh"
}
]
}
}
- Test the hook
/cc-hooks test secret-scanner
Expected outcome: Hook blocks commits with hardcoded secrets, passes clean commits.
Tutorial 3: Run a Multi-Agent Code Review
Goal: Review a PR using the council with expert-panel protocol.
Steps:
- Identify the review target
/cc-council src/auth/ --preset security --depth deep
- Observe the council process The council spawns multiple expert agents:
- Security specialist examines auth patterns
- Quality reviewer checks error handling
- Performance analyst reviews efficiency
- Read the scoring output Each scope gets an independent score:
Security: 7.2/10 (2 HIGH, 1 MEDIUM findings)
Quality: 8.5/10 (1 MEDIUM finding)
Performance: 9.1/10 (no significant findings)
- Address findings Start with HIGH severity findings. Fix them, then re-run:
/cc-council src/auth/ --preset security --changed-only
- Get final verdict Once all HIGH findings are resolved, the council issues APPROVE or APPROVE_WITH_CONDITIONS.
Expected outcome: Security findings identified and resolved, final score > 8.0.
Tutorial 4: Create a Custom Research Agent
Goal: Build a specialized agent for researching library APIs.
Steps:
- Define the agent
/cc-agent create library-researcher
- Configure the agent file
In
.claude/agents/library-researcher.md:
---
name: library-researcher
description: Researches library APIs and produces usage guides
model: claude-haiku-4-5-20251001
tools:
- Read
- Grep
- Glob
- WebFetch
---
- Write the system prompt Define: role, mandatory workflow, output format. The agent should:
- Accept a library name
- Search for official documentation using Context7
- Extract key APIs, patterns, and gotchas
- Return a concise summary
- Use the agent Invoke in conversation:
Use the library-researcher agent to research the latest Prisma ORM query patterns
Expected outcome: Agent returns a focused summary of Prisma query patterns with code examples.
Tutorial 5: Optimize a Context-Limited Session
Goal: Complete a large task without hitting context limits.
Steps:
- Check current budget
/cc-budget audit
See
Установить worked-examples в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGlobGrepBashAgentFAQ
Что делает скилл worked-examples?
Step-by-step tutorials and worked examples for common Claude Code workflows — setup, debugging, code review, agent teams, hooks, memory, optimization, and CI/CD
Как установить скилл worked-examples?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл worked-examples запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic