AgentSkillsCN

claude-code-features

全面梳理Claude Code的各项功能。适用于咨询Claude Code的能力、钩子、技能、智能体、插件或配置相关问题时使用。

SKILL.md
--- frontmatter
name: claude-code-features
description: Comprehensive reference of Claude Code features. Use when asking about Claude Code capabilities, hooks, skills, agents, plugins, or configuration.

Claude Code Feature Reference

Comprehensive list of Claude Code features as of January 2026.

Configuration Files

FilePurpose
CLAUDE.mdProject memory, read at session start
.claude/settings.jsonHook configuration, permissions
.claude/settings.local.jsonPersonal overrides (gitignored)
.mcp.jsonMCP server configuration
.lsp.jsonLSP server configuration

Hooks (13 Types)

HookTrigger
SessionStartSession begins
SessionEndSession ends
UserPromptSubmitUser submits prompt
PreToolUseBefore tool execution
PostToolUseAfter tool succeeds
PostToolUseFailureAfter tool fails
PermissionRequestPermission requested
NotificationNotification sent
StopAgent stopping
SubagentStartSubagent begins
SubagentStopSubagent completes
PreCompactBefore context compaction
SetupRepository init/maintenance

Hook Types

  • command - Execute shell command
  • prompt - Inject prompt (Stop/SubagentStop only)

Hook Response Format

json
{
  "continue": true,
  "stopReason": "string",
  "systemMessage": "string",
  "hookSpecificOutput": {
    "hookEventName": "PreToolUse",
    "permissionDecision": "allow|deny|ask"
  }
}

Skills

Required Frontmatter

  • name - Lowercase, hyphens, max 64 chars
  • description - When to use, max 1024 chars

Optional Frontmatter

  • allowed-tools - Tools allowed without permission
  • model - Specific model to use
  • context: fork - Isolated sub-agent context
  • agent - Agent type for fork context
  • hooks - Lifecycle hooks
  • user-invocable - Slash command visibility

Subagents

Required Frontmatter

  • name - Lowercase with hyphens
  • description - When to delegate

Optional Frontmatter

  • tools - Available tools
  • disallowedTools - Denied tools
  • model - sonnet, opus, haiku, inherit
  • permissionMode - default, acceptEdits, dontAsk, bypassPermissions, plan
  • skills - Skills to load
  • hooks - Lifecycle hooks

Built-in Agents

  • Explore - Fast read-only (Haiku)
  • Plan - Research for planning
  • general-purpose - Complex tasks
  • Bash - Terminal commands

Plugins

Structure

code
plugin/
├── .claude-plugin/plugin.json
├── commands/
├── agents/
├── skills/
├── hooks/hooks.json
├── .mcp.json
└── .lsp.json

Permissions

json
{
  "permissions": {
    "allow": ["Bash(git diff:*)"],
    "ask": ["Bash(git push:*)"],
    "deny": ["Read(./.env)"]
  }
}

MCP Servers

json
{
  "mcpServers": {
    "name": {
      "command": "npx",
      "args": ["-y", "@package/name"],
      "env": {}
    }
  }
}

Last verified: January 2026