Advanced Claude Code Skills
Claude Code Advanced: Rebuilding AI Workflows with Skills
If you're a heavy Claude Code user, you've probably had this deja vu: every time you start a new project, Claude acts like a fresh intern who doesn't know anything.
You have to explain over and over: we use this coding style, the deploy process works like this, auth goes through that logic... Once is fine. Ten times? That's soul-crushing.
The old fix was CLAUDE.md. Dump all the rules in there, auto-load on startup. But as projects grow, that file gets bloated. I've seen CLAUDE.md files stuffed with so many prompts that Claude starts slow, wastes precious Context Window on pre-loaded content, and the scattered attention actually makes answers worse.
Anthropic's new Skills feature finally solves this elegantly. It's not just a feature -- it's a modular AI knowledge architecture that actually fits engineering intuition.
Core Architecture: Progressive Disclosure
This is probably the sexiest part of Skills design.
CLAUDE.md was all-or-nothing loading -- no matter what you asked, every rule got shoved into Context. Skills use a layered loading mechanism that Anthropic calls Progressive Disclosure.
Based on observation and official docs, it splits Context into three layers:
L1 Metadata (Metadata Layer)
On startup, only name and description of each Skill get loaded. Super lightweight (~100 tokens). Claude uses just this layer to route: does this question need a particular Skill?
L2 Instructions (Instructions Layer)
When Claude determines a Skill matches, it loads that Skill's SKILL.md body content (keep it under 5000 tokens).
L3 Resources (Resources Layer)
If SKILL.md references scripts or docs, those files are loaded on-demand.
Architecture Benefits
This means you can theoretically mount unlimited knowledge bases on Claude. As long as your Description is accurate, it only pulls knowledge when needed and never wastes idle Context. The description acts as the gate — idle skills cost zero context.
Hands-On: Building a Skill from Scratch
A standard Skill is just a self-contained directory. The structure looks a lot like a Node.js module or an Ansible Role.
Directory Structure
my-skill/
├── SKILL.md # Core entry point (required)
├── scripts/ # Python or Bash scripts (optional)
├── references/ # Documentation and specs (optional)
└── assets/ # Static resource templates (optional)
Create a folder (e.g. my-skill) with a required SKILL.md file as the entry point. Optionally add scripts for Python/Bash, references for docs and specs, and assets for static templates.
SKILL.md Frontmatter Config
Strict format requirements here -- lessons learned from experience:
---
name: my-skill
description: When the user asks to commit code, use this Skill for code standards checking and commit workflow
allowed-tools: Read, Glob, Bash, Grep, Write
---
# Skill Title
Skill body content goes here...
Key gotchas:
- name field: lowercase letters, numbers, and hyphens only. Must exactly match the directory name
- description field: This is for the LLM's router. You need to clearly describe the trigger condition -- like "when user asks to commit code..." -- so Claude can match accurately
Skills vs MCP vs Custom Commands: How to Choose?
This is where confusion happens most. If MCP (Model Context Protocol) already exists, why do we need Skills? Here's the mental model:
| Type | Nature | Use Cases | Trigger | Role |
|---|---|---|---|---|
| Custom Commands | Macro / Static Prompt | You know exactly what to do now -- lint check, refactor | Manual | Manual-mode tool |
| MCP | IO Interface / Hands & Feet | Connecting to external world -- read DB, call GitHub API | On-demand | AI's senses and limbs |
| Skills | Procedural Knowledge / Brain | Complex thought chains or workflows -- team-standard code review | AI decides | AI's specialist skill pack |
Complementary Relationship
Don't think Skills will replace MCP. They're complementary.
Example: You write a Deploy Skill (brain) that tells Claude the deployment steps. During execution, Claude calls AWS MCP (hands) to actually operate the servers.
Skills (brain: knows how)
↓
calls
↓
MCP (hands: actually does it)
6 Practical Skills Examples
These come from feiskyer/claude-code-settings and can be installed directly.
1. codex-skill - Codex CLI Automation
Delegates tasks to OpenAI Codex for GPT-5 series model scenarios.
Install:
/plugin marketplace add feiskyer/claude-code-settings
/plugin install codex-skill
Core features:
- Multiple execution modes (read-only, workspace write, full access)
- Model selection (gpt-5, gpt-5.1, gpt-5.1-codex)
- Approval-free autonomous execution
- JSON output support
- Resumable sessions
Prerequisite: Codex CLI (npm i -g @openai/codex or brew install codex)
2. autonomous-skill - Long-Running Task Automation
Executes complex long-running tasks across multiple sessions using dual-agent mode (Initializer + Executor).
Install:
/plugin install autonomous-skill
Core features:
- Dual-agent mode (Initializer creates task list, Executor completes tasks)
- Auto-continue across sessions with progress tracking
- Task isolation with independent directories (
.autonomous/<task-name>/) - Progress persistence via
task_list.mdandprogress.md
Usage example:
You: "Please use autonomous skill to build a REST API for a todo app"
Claude: [Creates .autonomous/build-rest-api-todo/, initializes task list, starts executing]
3. nanobanana-skill - Gemini Image Generation
Uses Google Gemini API to generate or edit images.
Install:
/plugin install nanobanana-skill
Core features:
- Multiple aspect ratios (square, portrait, landscape, ultrawide)
- Image editing capability
- Multiple resolutions (1K, 2K, 4K)
- Supports gemini-3-pro-image-preview, gemini-2.5-flash-image
Prerequisites:
- Configure GEMINI_API_KEY in
~/.nanobanana.env - Python3 + google-genai, Pillow, python-dotenv
4. youtube-transcribe-skill - YouTube Transcript Extraction
Extracts subtitles/transcripts from YouTube video links.
Install:
/plugin install youtube-transcribe-skill
Core features:
- Dual extraction: CLI (fast) and browser automation (fallback)
- Auto language selection (zh-Hans, zh-Hant, en)
- Efficient DOM extraction
- Saves transcripts to local text files
Prerequisite: yt-dlp (CLI method) or chrome-devtools-mcp (browser method)
5. kiro-skill - Interactive Feature Development
Idea-to-implementation interactive feature development workflow.
Install:
/plugin install kiro-skill
Trigger: Mention "kiro" or reference .kiro/specs/ directory
Workflow:
- Requirements → Define what to build (EARS format + user stories)
- Design → Determine how to build (architecture, components, data model)
- Tasks → Create executable implementation steps (test-driven, incremental)
- Execute → Implement tasks one by one
Usage example:
You: "I need to create a kiro feature spec for user authentication"
Claude: [Automatically uses kiro-skill]
6. spec-kit-skill - Spec-Driven Development
GitHub Spec-Kit integration for specification-based development.
Install:
/plugin install spec-kit-skill
Trigger: Mention "spec-kit", "speckit", "constitution", "specify" or reference .specify/ directory
Setup:
# Install spec-kit CLI
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
# Initialize project
specify init . --ai claude
7-Phase Workflow:
- Constitution → Establish governance principles
- Specify → Define feature requirements
- Clarify → Resolve ambiguities (max 5 questions)
- Plan → Create technical strategy
- Tasks → Generate dependency-ordered tasks
- Analyze → Verify consistency (read-only)
- Implement → Execute implementation
Practical Lessons Learned
Right now Claude Code is like a generalist -- knows a bit of everything but isn't an expert at anything. The essence of Skills is packaging domain expert know-how into self-contained, Docker-container-like packages.
Recommended Skill Categories
| Skill Type | Examples |
|---|---|
| Code Standards | PR review standards, commit conventions |
| Testing Workflows | Unit test standards, E2E test workflows |
| Deployment Processes | CI/CD config, environment deployment |
| Library-Specific | React component standards, NestJS module patterns |
| Business Logic | Payment flows, user auth workflows |
Best Practices
- Write precise descriptions: This determines whether the Skill gets triggered correctly
- Keep content under 5000 tokens: Too long hurts loading efficiency
- Split by domain: One Skill, one domain
- Reference external resources: Put complex content in
references/orscripts/
Summary
Skills are a major Claude Code upgrade. They solve the bloated CLAUDE.md and wasted Context problems, letting you:
- Modularly manage AI knowledge
- Load on demand to reduce token waste
- Trigger precisely to improve answer quality
If you're still rocking one massive CLAUDE.md, it's time to migrate to the Skills architecture.
Original author: AI Observatory | Published 2026-01-10
📚 相关资源
❓ 常见问题
关于本章主题最常被搜索的问题,点击展开答案
Skills 和 CLAUDE.md 比,到底解决了什么问题?
解决 CLAUDE.md 的全量加载问题。CLAUDE.md 不管你问什么所有规则一股脑塞进 Context,文件大了就启动慢、Context window 被占、模型注意力分散。Skills 用 Progressive Disclosure 三层加载:L1 metadata 约 100 tokens 常驻,L2 instructions 命中才加载(建议 < 5000 tokens),L3 resources 按需读 — 理论上挂载无限知识库不占闲置 context。
一个 Skill 的目录结构应该怎么写?
标准 4 件套:`SKILL.md`(必须,核心入口)、`scripts/`(Python / Bash 可选)、`references/`(文档规范可选)、`assets/`(静态模板可选)。`SKILL.md` 的 frontmatter 必填 `name`(小写字母 + 数字 + 连字符,必须和目录名完全一致)、`description`(写给 LLM Router 看的触发条件)、`allowed-tools`(限制工具权限)。
Skills、MCP、Custom Commands 怎么区分?
三者本质不同:Custom Commands = 静态 Prompt 宏,明确知道要干嘛时手动 `/` 触发(手动挡);MCP = IO 接口,连外部世界(DB、GitHub API),是 AI 的感官和肢体;Skills = 程序性知识 / 脑回路,复杂工作流,AI 自动判断何时调用。三者互补 — Deploy Skill(大脑)调 AWS MCP(手脚)执行部署。
Skill 的 description 字段为什么这么重要?
因为它是写给 LLM Router 看的,决定 Skill 能不能被精准命中。L1 metadata 加载时只读 name + description,模型仅凭这一句决定要不要调用 Skill。模糊的描述("用于代码审查")命中率低;明确的触发条件("当用户要求提交代码时使用此 Skill 进行规范检查和提交流程")命中率高。文档明确建议描述以 "当用户..." 开头。
本章推荐的 6 个开源 Skill,哪个最值得装?
看场景:(1) 想 7×24 自动跑长任务装 `autonomous-skill`,双代理(Initializer + Executor)跨会话续跑;(2) 做规范驱动开发装 `spec-kit-skill`,7 阶段从 Constitution → Implement;(3) 经常处理 YouTube 视频装 `youtube-transcribe-skill`;(4) 用 Gemini 生图装 `nanobanana-skill`。`/plugin marketplace add feiskyer/claude-code-settings` 一行装全部。