Token导航 LogoToken导航

Agent Skill · 开发

claude-code-knowledge(Claude 代码知识)

claude-code-knowledge 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

claude-code-knowledge 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 21,184。

总安装 194周安装 8GitHub Stars 66下载 63核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:claude-code-knowledge(Claude 代码知识)
来源仓库:https://github.com/dykyi-roman/awesome-claude-code
仓库路径:skills/claude-code-knowledge
安装命令:
npx skills add https://github.com/dykyi-roman/awesome-claude-code --skill claude-code-knowledge
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dykyi-roman/awesome-claude-code --skill claude-code-knowledge

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

claude-code-knowledge 解释 .claude 目录下各类组件的类型与作用域。明确 commands、agents、skills、hooks 和 rules 的加载机制和调用上下文。帮助开发者正确组织项目结构并理解各组件的成本特征。memory 和 rules 类组件总是自动加载,其他类型按需激活。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/claude-code-knowledge

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dykyi-roman/awesome-claude-code --skill claude…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

claude-code-knowledge 怎么安装?

在终端执行 npx skills add https://github.com/dykyi-roman/awesome-claude-code --skill claude-code-know…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

claude-code-knowledge 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

claude-code-knowledge 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/dykyi-roman/awesome-claude-code --skill claude-code-knowledge 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

claude-code-knowledge 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

claude-code-knowledge 用的人多吗?

公开数据是累计安装 194 次,近一周安装 8 次,下载 63 次,GitHub 66 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

claude-code-knowledge 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
claude-code-knowledge

Claude 代码知识 · 本页

19466执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Claude Code Knowledge Base

Component Types Overview

TypePathInvocationContext Cost
Command.claude/commands/name.md/name argsLoaded on invocation
Agent.claude/agents/name.mdTask(subagent_type)Loaded into subagent context
Skill.claude/skills/name/SKILL.mdAuto or /nameLoaded by description match
Hook.claude/settings.jsonAutomatic on eventZero (shell script)
Rules.claude/rules/*.mdAuto-loaded alwaysAlways in system prompt
MemoryCLAUDE.md (various levels)Auto-loaded alwaysAlways in system prompt

Commands

Path: .claude/commands/name.md Invocation: /name or /name arguments

---
description: Required. What the command does.
allowed-tools: Optional. Restrict tools (comma-separated).
model: Optional. opus/sonnet/haiku — or alias from settings.
argument-hint: Optional. Hint shown in autocomplete.
---

Command instructions here.

Use $ARGUMENTS for full argument string.
Use $ARGUMENTS[0], $ARGUMENTS[1] for positional args.
Use $1, $2 as shorthand for $ARGUMENTS[N].
Use ${CLAUDE_SESSION_ID} for session identifier.

Key rules:

  • Equivalent to .claude/skills/name/SKILL.md with user-invocable: true
  • Commands in subdirectories: .claude/commands/sub/name.md → /sub/name
  • Budget: SLASH_COMMAND_TOOL_CHAR_BUDGET (default 15000 chars)

Agents (Subagents)

Path: .claude/agents/name.md Invocation: Task tool with subagent_type="name"

---
name: agent-name            # required, matches filename without .md
description: Required. When to use. "PROACTIVELY" for auto-invoke.
tools: Optional. All by default. Comma-separated.
disallowedTools: Optional. Denylist complement to tools.
model: Optional. opus | sonnet | haiku | inherit
permissionMode: Optional. default | acceptEdits | plan | dontAsk | delegate | bypassPermissions
skills: Optional. Auto-load skills (comma-separated inline list).
hooks: Optional. Lifecycle hooks scoped to this agent.
memory: Optional. user | project | local — CLAUDE.md scope to load.
---

Agent system prompt here.

Permission modes:

  • default — ask user for each tool use
  • acceptEdits — auto-allow file edits, ask for others
  • plan — read-only exploration, no writes
  • dontAsk — run without asking, within sandbox
  • delegate — inherit parent permissions
  • bypassPermissions — skip all permission checks (dangerous)

Built-in subagent types: Explore, Plan, general-purpose, Bash, statusline-setup, claude-code-guide

Execution: foreground (blocks) or background (run_in_background: true). Resume via agent ID.

Scope priority: CLI --agents flag > project .claude/agents/ > user ~/.claude/agents/ > plugin agents


Skills

Path: .claude/skills/name/SKILL.md Invocation: /name (if user-invocable) or auto-loaded by agent/description match

---
name: skill-name            # lowercase, hyphens, max 64 chars
description: Required. What and when. Max 1024 chars.
allowed-tools: Optional. Restrict tools.
model: Optional. Model override when skill is active.
context: Optional. "fork" for isolated subagent execution.
agent: Optional. Which subagent type to run in (Explore, Plan, etc).
hooks: Optional. Lifecycle hooks scoped to this skill.
disable-model-invocation: true   # only user can invoke
user-invocable: false            # only Claude can invoke
---

Skill instructions here.

Use $ARGUMENTS, $ARGUMENTS[N], $N for user input.
Use !`command` for dynamic context injection (shell output inserted).

Folder structure:

skill-name/
├── SKILL.md        # required, max 500 lines
├── references/     # large content extracted here
├── scripts/        # executable code
└── assets/         # templates, resources

Invocation control matrix:

disable-model-invocationuser-invocableWho can invoke
false (default)true (default)Both user and Claude
truetrueUser only (via /name)
falsefalseClaude only (auto-load)
truefalseNobody (disabled)

Hooks

Path: .claude/settings.json (or agent/skill frontmatter hooks: field)

Hook Events (12)

EventWhenMatcherCan Block
PreToolUseBefore tool executionTool nameYes
PostToolUseAfter tool executionTool nameNo
NotificationOn notification—No
StopAgent stops—No
SubagentStopSubagent completesAgent nameNo
PreCompactBefore context compaction—No
PostCompactAfter context compaction—No
ToolErrorTool execution errorTool nameNo
PreUserInputBefore user message processed—No
PostUserInputAfter user message processed—No
SessionStartSession begins—No
SessionEndSession ends—No

Hook Types (3)

{"type": "command", "command": "./script.sh"}
{"type": "prompt", "prompt": "Check if output is safe"}
{"type": "agent", "agent": "validator-agent"}

Exit Codes

CodeBehavior
0Allow (continue)
2Block (deny tool use, PreToolUse only)
OtherLog warning, continue

Hook Configuration

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {"type": "command", "command": "php -l $CLAUDE_FILE_PATH", "async": false}
        ]
      }
    ]
  }
}

Matcher patterns: exact name, | OR, regex. MCP tools: mcp__server__tool.

For comprehensive hooks reference see references/hooks-reference.md.


Memory & CLAUDE.md

Hierarchy (top to bottom, higher = higher priority)

LevelLocationScope
ManagedSystem dirs (enterprise)Organization-wide
User~/.claude/CLAUDE.mdAll user projects
User rules~/.claude/rules/*.mdAll user projects
ProjectCLAUDE.md (project root)This project
Project rules.claude/rules/*.mdThis project
LocalCLAUDE.local.md (project root, auto-gitignored)This machine only
Nestedsrc/CLAUDE.md, tests/CLAUDE.mdSubdirectory context

Rules Files

.claude/rules/*.md — modular rules, always loaded into system prompt.

Path-specific rules via paths frontmatter:

---
paths:
  - src/Domain/**
  - src/Application/**
---
These rules apply only when working with files matching the glob patterns above.

Import Syntax

@path/to/file.md      # relative to current file
@/absolute/path.md    # absolute path
@~/user/path.md       # home directory

Import recursion limit: 5 hops max.

Commands

  • /memory — view and edit memory files
  • /init — generate initial CLAUDE.md from project analysis

For full reference see references/memory-and-rules.md.


Plugins

Path: .claude-plugin/plugin.json (plugin root)

{
  "name": "my-plugin",
  "description": "What this plugin provides",
  "version": "1.0.0",
  "author": "Name",
  "repository": "https://github.com/user/repo"
}

Plugin structure:

.claude-plugin/
├── plugin.json         # manifest (required)
├── commands/           # namespaced as /plugin:command
├── agents/             # available as subagent_type
├── skills/             # namespaced as /plugin:skill
├── hooks/hooks.json    # plugin-scoped hooks
├── .mcp.json           # MCP server config
└── .lsp.json           # LSP server config

Namespaced invocation: /plugin-name:skill-name

Installation sources: GitHub, Git URL, NPM, File path, Directory.

For full reference see references/plugins-reference.md.


Permissions

Rule Syntax

{
  "permissions": {
    "allow": ["Read", "Glob", "Grep"],
    "deny": ["Bash(rm *)"],
    "ask": ["Write", "Edit"]
  }
}

Specifier patterns:

PatternExampleMatches
ToolReadAll Read calls
Tool(literal)Bash(npm test)Exact command
Tool(glob)Read(src/**)Gitignore-style glob
Tool(domain:)WebFetch(domain:api.example.com)Domain filter
mcp__server__toolmcp__github__create_issueMCP tool
Task(agent)Task(ddd-auditor)Specific subagent

Evaluation order: deny → ask → allow (deny wins over allow)

For full reference see references/settings-and-permissions.md.


MCP (Model Context Protocol)

Config: .mcp.json (project root) or in settings.json

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-name"],
      "env": {"API_KEY": "..."}
    }
  }
}

Tool naming: mcp__servername__toolname

Scope hierarchy: project .mcp.json > user settings > plugin .mcp.json

Permission: enableAllProjectMcpServers, allowedMcpServers, deniedMcpServers in settings.


Settings

Hierarchy: managed > CLI args > local > project > user

LevelLocation
User~/.claude/settings.json
Project.claude/settings.json
Local.claude/settings.local.json (gitignored)
ManagedEnterprise system dirs

Key settings areas: permissions, hooks, sandbox, MCP, model config, context management, attribution.

For full schema reference see references/settings-and-permissions.md.


Decision Framework

When to use which component type:

GoalBest ComponentReason
Reusable saved promptCommandUser invokes, low context cost
Complex analysis in isolationAgentSeparate context window
Knowledge base / templatesSkillAuto-loaded, shared across agents
Auto-trigger on eventsHookZero context cost, shell execution
Project-wide instructionsCLAUDE.mdAlways in context
Path-specific rulesRules (.claude/rules/)Conditional loading
Distributable extensionPluginNamespaced, installable
External tool integrationMCPStandardized protocol

Context Cost Awareness

ComponentContext Budget Impact
CLAUDE.md + rulesAlways loaded (~500 lines recommended max)
Skills (auto-loaded)Loaded when description matches (~15K chars budget)
Skills (by agent)Loaded into agent's context window
AgentsSeparate context window (no parent cost)
Hooks (command type)Zero context cost (shell execution)
Hooks (prompt/agent type)Uses context for LLM evaluation
MCP toolsTool descriptions always in context
PluginsComponents loaded per their type rules

Patterns

Parallel Agents

Run in parallel:
1. Task: researcher — study architecture
2. Task: security-scanner — check security
3. Task: performance-analyzer — check performance

Wait for all and combine results.

Progressive Disclosure

SKILL.md — brief instructions (max 500 lines)
references/ — details loaded when needed
scripts/ — execute without reading into context

Chained Agents

1. researcher → studies the task
2. planner → creates plan based on research
3. implementer → implements the plan
4. reviewer → reviews implementation

Agent Teams (Coordinator Pattern)

coordinator (opus) → delegates via Task tool
├── auditor-1 (sonnet, parallel)
├── auditor-2 (sonnet, parallel)
└── generator (sonnet, sequential after audit)

Coordinator uses TaskCreate/TaskUpdate for progress tracking.

Plugin Distribution

Package as .claude-plugin/ → publish to GitHub/NPM
Users install: enabledPlugins in settings
Skills namespaced: /plugin-name:skill-name

Validation Checklists

Commands

  • description is filled and specific
  • Path: .claude/commands/*.md
  • $ARGUMENTS used if argument-hint defined
  • model specified consciously (opus for complex, haiku for fast)
  • Instructions are clear and step-by-step

Agents

  • name and description are filled
  • name matches filename (without .md)
  • tools are minimally necessary
  • disallowedTools used if most tools needed except few
  • model chosen consciously
  • permissionMode appropriate for task
  • skills: is comma-separated inline list (not YAML array)
  • Coordinators have TaskCreate, TaskUpdate in tools
  • Coordinators have task-progress-knowledge in skills

Skills

  • name is lowercase with hyphens, matches folder name
  • description < 1024 characters, explains "when to use"
  • SKILL.md < 500 lines
  • Large content extracted to references/
  • context: fork if needs isolated execution
  • Path: .claude/skills/name/SKILL.md

Hooks

  • JSON is valid
  • Event name is one of 12 valid events
  • matcher is correct tool/agent name or pattern
  • command script exists and is executable
  • Exit codes handled properly (0=allow, 2=block)
  • async: true only for non-blocking operations

Memory/Rules

  • CLAUDE.md < 500 lines (recommended)
  • .claude/rules/*.md for modular rules
  • CLAUDE.local.md in .gitignore
  • @imports resolve (max 5 hops)
  • paths frontmatter uses valid glob patterns

Settings

  • Valid JSON in settings.json
  • Permission rules follow deny → ask → allow order
  • settings.local.json is gitignored
  • Sandbox configured if auto-allowing Bash
  • MCP servers explicitly allowed/denied

Reference Files

Detailed documentation for specific areas:

平台分布

Codex

37.99%
按下载量换算24

Claude

27.64%
按下载量换算17

Cursor

20.13%
按下载量换算13

Gemini CLI

10.1%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/dykyi-roman/awesome-claude-code --skill claude-code-knowledge 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills