← 返回 Skills 市场
lywhlao2025

Context Engineering For Projects

作者 lywhlao2025 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
266
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install context-engineering-for-projects-skill
功能描述
Build or initialize team-style project context directories for context engineering. Use when the user says “构建/初始化项目上下文”, “针对该项目构建上下文”, **or** in English phr...
使用说明 (SKILL.md)

Context Engineering

Overview

Create a consistent project context structure (team navigation + project folder) and link it to a code directory. Default target root is ~/clawDir/team, but allow the user to specify another root path.

Loading Model (L1/L2/L3)

  • L1: Project skill.md — global overview, module navigation, environment notes.
  • L2: modules/ + agents/ — task-scoped module docs and agent role docs. Load the module overview first, then specific submodules; load the relevant agent README when working on that role’s tasks.
  • L3: references/ — entrypoints, API indices, migrations, evidence-level docs.

Workflow

  1. Collect inputs

    • project_name (folder name)
    • code_dir (absolute path to the code)
    • target_root (optional). If not provided, use ~/clawDir/team.
  2. Analyze the code structure

    • Identify tech stack and main areas (frontend/backend/qa/etc.) from code directory structure and key files.
    • Read top-level docs: README*, docs/, tech.md, architecture.md, CHANGELOG* if present.
  3. Initialize the context structure

    • Prefer running the bundled script:
      python scripts/init_context_project.py \
        --project \x3Cproject_name> \
        --code-dir \x3Ccode_dir> \
        --target-root \x3Ctarget_root>
      
    • The script infers module buckets from the codebase and creates module folders dynamically.
    • The script is idempotent: it won’t overwrite existing files.
  4. Populate content (critical)

    • Fill skill.md (L1) with project summary, architecture, entrypoints, build/run, module navigation.
    • Fill modules/\x3Cmodule>/README.md (overview) and modules/\x3Cmodule>/\x3Cmodule>.md (detail).
    • Fill references/entrypoints.md with code-level entrypoints and indexes.
  5. Post-init checks

    • Verify the created files exist and are filled under: \x3Ctarget_root>/projects/\x3Cproject_name>/.
    • If the user wants custom content, update modules and references accordingly.
    • Record major changes in decisions.md (project-level) or decisions.jsonl (agent-level).

Modules Directory Guidance

  • modules/ is generated based on the target codebase (not fixed).
  • Recommended buckets: frontend, backend, qa, reviewer (only if inferred).
  • Each module may contain multiple detailed docs; keep an overview modules/\x3Cmodule>/README.md and a modules/\x3Cmodule>/\x3Cmodule>.md for detailed module notes.
  • If a domain is present (e.g., mobile, data, ops, infra), create that module.

Generation Rules (Modules & Agents)

Modules

  • Each module folder must include:
    • modules/\x3Cmodule>/README.md (overview)
    • modules/\x3Cmodule>/\x3Cmodule>.md (details: Scope, Key Responsibilities, Important Notes, Interfaces & Dependencies)
  • If a module is large, split into multiple files (e.g., A.md, B.md, C.md). In that case, \x3Cmodule>.md becomes an index/summary that describes each sub-file and when to load it.

Agents

  • Create one folder per agent under agents/\x3Cagent>/.
  • Agent list is inferred from module buckets; always include reviewer.
  • Each agent folder must include:
    • README.md with Role, Principles, Responsibilities, Deliverables, Working Style, Notes
    • tools.md (Markdown)
    • memory.md (Markdown)
    • decisions.jsonl (JSONL, one decision per line)
    • fails.jsonl (JSONL, one failure per line)
  • README.md must also include a brief description of the purpose of other files in the current agent directory.

Content Extraction Rules (General)

Keep SKILL.md lean. For detailed extraction guidance (entrypoints, flows, data, tests, i18n), load:

  • references/extraction-rules.md

Output Templates (Required)

L1 (skill.md)

  • Project summary (what it is + target users)
  • Architecture & boundaries
  • Entrypoints + build/run
  • Module navigation
  • Progressive loading model (L1/L2/L3)
  • Spec-driven development
    • Spec-first rule (no implementation without a spec)
    • Spec template (scope, interfaces, edge cases/errors, acceptance criteria, tests)
    • Change control (spec updates recorded in decisions)
    • Traceability (code/tests map back to spec items)

L2 (modules/\x3Cmodule>/README.md)

  • Responsibilities
  • Key areas/files
  • Typical tasks

L2 (modules/\x3Cmodule>/\x3Cmodule>.md)

  • Scope
  • Key Responsibilities
  • Important Notes (constraints, risks, decisions)
  • Interfaces & Dependencies
  • Key flows (if applicable)
  • Testing/QA hooks

L2 (agents/\x3Cagent>/README.md)

  • Role
  • Principles
  • Responsibilities
  • Deliverables
  • Working Style
  • Notes
  • Description of other files in the agent directory

L3 (references/entrypoints.md)

  • Entry file index
  • Core logic/index files
  • Data/storage index
  • i18n index
  • Build/release/ops entrypoints

Quality Checklist (Before Finalizing)

  • L1 filled with accurate architecture and run/build info
  • Each module has README + \x3Cmodule>.md
  • References contain concrete file paths
  • Loading paths cover UI/UX, core logic, QA, release scenarios
  • Agent folders exist with clear responsibilities

Files Created

  • \x3Ctarget_root>/readme.md (if missing)
  • \x3Ctarget_root>/projects/projects.md (index with new project entry)
  • \x3Ctarget_root>/projects/\x3Cproject_name>/readme.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/goals.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/skill.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/project_status.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/decisions.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/agents/agents.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/modules/README.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/modules/\x3Cmodule>/README.md (modules inferred from code)
  • \x3Ctarget_root>/projects/\x3Cproject_name>/modules/\x3Cmodule>/\x3Cmodule>.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/references/entrypoints.md

Resources

  • scripts/init_context_project.py — scaffold generator (preferred).
安全使用建议
This skill appears to do what it says: it inspects a local code directory (top-level files/folders) and scaffolds a project-context tree under a target root (default ~/clawDir/team). It does not access network or request secrets. Before running, verify the --code-dir you pass points to the intended project (avoid pointing to sensitive/system directories) and choose or review the --target-root so you know where files will be created. You can review the included scripts/init_context_project.py (straightforward, idempotent) or run it first in a temporary directory to confirm behavior. If you do not want the agent to modify your filesystem autonomously, avoid enabling autonomous invocation or run the script manually.
功能分析
Type: OpenClaw Skill Name: context-engineering-for-projects-skill Version: 1.0.1 The skill bundle is designed to scaffold a structured project context directory for documentation purposes. It includes a Python script (scripts/init_context_project.py) that creates a directory hierarchy and template Markdown files based on an analysis of a local codebase's structure, with no evidence of data exfiltration, malicious execution, or unauthorized persistence.
能力评估
Purpose & Capability
Name/description claim to scaffold project context directories; the provided Python script and SKILL.md both implement exactly that behavior (inferring modules from a code directory and creating docs). No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to read the target code directory's top-level files/dirs and to run the bundled script to create context files. This matches the script, which lists top-level entries in code_dir and writes template files under the chosen target root. Note: the skill will read the specified code_dir (top-level entries) and will create files under the target_root—this is expected but worth explicit user confirmation before running.
Install Mechanism
Instruction-only skill with no install spec; the included script is a plain Python file. No downloads or package installs are performed by the skill itself.
Credentials
No environment variables, credentials, or config paths are required. The script uses Path.home() only to compute a default target root; that is proportional to the stated behavior.
Persistence & Privilege
The script creates files under the specified target_root (default ~/clawDir/team) and appends an index entry. always is false. Creating files is expected for a scaffolding tool, but the user should be aware the skill will write to their filesystem and confirm the target path.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install context-engineering-for-projects-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /context-engineering-for-projects-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Expanded trigger phrases in the skill description to include common English commands, enabling the skill with prompts like “build/initialize project context”, “scaffold project context”, “set up team context”, and others. - No changes to workflow, output templates, or content structure. - No impact on usage for existing Chinese trigger phrases.
v1.0.0
Scaffold a complete context-engineering system for any project: L1/L2/L3 docs, module & agent specs, entrypoint references, and spec-driven workflows—built for scalable, traceable collaboration.
元数据
Slug context-engineering-for-projects-skill
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Context Engineering For Projects 是什么?

Build or initialize team-style project context directories for context engineering. Use when the user says “构建/初始化项目上下文”, “针对该项目构建上下文”, **or** in English phr... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 266 次。

如何安装 Context Engineering For Projects?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install context-engineering-for-projects-skill」即可一键安装,无需额外配置。

Context Engineering For Projects 是免费的吗?

是的,Context Engineering For Projects 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Context Engineering For Projects 支持哪些平台?

Context Engineering For Projects 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Context Engineering For Projects?

由 lywhlao2025(@lywhlao2025)开发并维护,当前版本 v1.0.1。

💬 留言讨论