AI 日报hiw3c.com

Claude Code具有高级上下文工程技术和模式的技能

原文标题 · Claude Code skills for advanced context engineering techniques and patterns
Hacker News Top github.com 网页快照
正文为英文,可一键机器翻译(仅首次需要等待)

Uh oh!

There was an error while loading. Please reload this page .

Notifications You must be signed in to change notification settings

Latest commit

History

Folders and files

Repository files navigation

Advanced context engineering techniques and patterns for Claude Code, OpenCode, Cursor, Antigravity and more.

Quick Start · Plugins · Github Action · Reference · Docs

Context Engineering Kit

A hand-crafted collection of advanced context engineering techniques and patterns with minimal token footprint, focused on improving agent result quality and predictability.

The marketplace is based on prompts our company's developers have used daily for a long time, supplemented by plugins from benchmarked papers and high-quality projects.

Key Features

Simple to Use - Easy to install and use without any dependencies. Contains automatically used skills and self-explanatory commands.

Token-Efficient - Carefully crafted prompts and architecture, preferring command-oriented skills with sub-agents over general information skills when possible, to minimize populating context with unnecessary information.

Quality-Focused - Each plugin is focused on meaningfully improving agent results in a specific area.

Granular - Install only the plugins you need. Each plugin loads only its specific agents, commands, and skills, without overlap or redundant skills.

Scientifically proven - Plugins are based on proven techniques and patterns validated by reputable benchmarks and studies.

Open-Standards - Skills are based on agentskills.io specification. The SDD plugin is based on the Arc42 specification standard for software development documentation.

News

v3.1.0: Improved Spec-Driven Development plugin generated code quality by embedding DDD/SOLID rules in the developer agent and adding a dedicated code-reviewer agent that applies functional and OOP best-practices rules together with Muda waste analysis to reduce code complexity and duplication.

v3.0.0: Added support for AMP and Hermes agents. Tech Stack plugin now automatically injects typescript best practices when agent reads or writes TypeScript files.

v2.2.0: Subagent-Driven Development plugin now works as a distilled version of SDD plugin using meta-judge and judge sub-agents for specification generation on the fly and in parallel to implementation. DDD plugin now includes Clean Architecture, DDD, SOLID, Functional Programming, and other pattern examples as rules that are automatically added to the context during code writing.

v2.1.0: Spec-Driven Development plugin agents include high-level code quality guidelines from DDD plugin .

v2.0.0: Spec-Driven Development plugin was rewritten from scratch. It is now able to produce working code in 99% of cases on real-life production projects!

Quick Start

Step 1: Install Marketplace and Plugins

Open Claude Code and add the Context Engineering Kit marketplace:

/plugin marketplace add NeoLabHQ/context-engineering-kit

This makes all plugins available for installation, but does not load any agents or skills into your context.

Install any plugin — for example, reflexion:

/plugin install reflexion@NeoLabHQ/context-engineering-kit

Each installed plugin loads only its specific agents, commands, and skills into Claude's context.

Install the extension directly from the repository:

gemini extensions install https://github.com/NeoLabHQ/context-engineering-kit

Note: This installs every plugin's skills and agents as a single bundle — there's no per-plugin selection like Claude Code's. Unfortunately, Gemini CLI does not support per-plugin selection. But you can delete skills and agents that you don't need, after installation.

Install the plugin directly from the repository's antigravity/ folder — Gemini CLI is not required:

agy plugin install https://github.com/NeoLabHQ/context-engineering-kit/antigravity

Note: This installs every plugin's skills and agents as a single bundle — there's no per-plugin selection like Claude Code's. Unfortunately, Antigravity CLI does not support per-plugin selection. But you can delete skills and agents that you don't need, after installation.

Run the vercel-labs/skills command in your terminal:

npx skills add NeoLabHQ/context-engineering-kit

Note: Each provider uses its own agent format and npx skills does not support subagents, so this installation method won't provide the full experience.

You can use OpenSkills to install skills by running the following commands:

npx openskills install NeoLabHQ/context-engineering-kit npx openskills sync

Step 2: Use Plugin

> claude " implement user authentication " # Claude implements user authentication, then you can ask it to reflect on implementation > /reflect # It analyses results and suggests improvements # If issues are obvious, it will fix them immediately # If they are minor, it will suggest improvements that you can respond to > fix the issues # If you would like to prevent issues found during reflection from appearing again, # ask Claude to extract resolution strategies and save the insights to project memory > /memorize

Alternatively, you can use the reflect word in the initial prompt:

> claude " implement user authentication, then reflect " # Claude implements user authentication, # then hook automatically runs /reflect

In order to use this hook, you need to have bun installed. However, it is not required for the overall command.

Documentation

You can find the complete Context Engineering Kit documentation here .

However, the main plugins we recommend starting with are Subagent-Driven Development and Spec-Driven Development .

Agent Reliability Engineering

The three plugins in this marketplace are designed to improve how accurately and consistently the agent follows provided instructions and to reduce hallucinations and bias toward incorrect solutions. They are not competitors but rather complementary to each other, because they allow you to balance reliability vs. token cost. Here is a high-level comparison of different agent usage approaches and the probability of receiving results that are fully accurate and include zero hallucinations, based on task complexity:

Reliability metrics are based on more than year of real development usage on production projects.

Plugins List

/plugin

Reflexion - Feedback and refinement loops to improve output quality.

Spec-Driven Development - Commands for specification-driven development, based on Continuous Learning + LLM-as-Judge + Agent Swarm. Achieves development as compilation through reliable code generation.

Review - Open-source and higher quality version of CodeRabbit. Includes code and PR review commands and skills using multiple specialized agents with impact/confidence filtering. Free Github Actions integration available

Git - Commands for commit and PR creation.

Test-Driven Development - Commands for test-driven development and common anti-patterns, plus skills for testing using subagents.

Subagent-Driven Development - Skills for subagent-driven development, which dispatches a fresh subagent for each task with code review between tasks, enabling fast iteration with quality gates.

Domain-Driven Development - Commands to update CLAUDE.md with best practices for domain-driven development, focused on code quality, and includes Clean Architecture, SOLID principles, and other design patterns.

FPF - First Principles Framework - Structured reasoning using ADI cycle (Abduction-Deduction-Induction) with knowledge layer progression. Uses workflow command pattern with fpf-agent for hypothesis generation, verification, and auditable decision-making.

Kaizen - Inspired by Japanese continuous improvement philosophy, Agile and Lean development practices. Commands for analysis of root causes of issues and problems, including 5 Whys, Cause and Effect Analysis, and other techniques.

Customaize Agent - Commands and skills for writing and refining commands, hooks, and skills for Claude Code. Includes Anthropic Best Practices and Agent Persuasion Principles that can be useful for sub-agent workflows.

Docs - Commands for analyzing projects, writing and refining documentation.

Tech Stack - Rules for language-specific best practices, automatically applied when working on matching file types.

MCP - Commands for setting up well-known MCP server integrations when needed and updating the CLAUDE.md file with requirements to use MCP servers in the current project.

Works Great With

We developed the following projects to speed up development further and improve code quality:

Agent Sandbox - Development sandbox image for agents, based on the official devcontainers images from Microsoft. Works out of the box with most languages and agents.

Agent Eslint Config - An overly opinionated ESLint config for AI agents. Forces them to write low-complexity, highly readable code. Includes SonarJS, Unicorn, and 100+ rules focused on security and cognitive complexity.

Both are tested and combine well with the SADD / SDD plugins, but also work great independently of Context Engineering Kit.

Stay ahead

Star Context Engineering Kit on GitHub to support its development and get notified about new features and updates.

Reflexion

Collection of commands that force the LLM to reflect on the previous response and output. Includes automatic reflection hooks that trigger when you include "reflect" in your prompt.

/plugin install reflexion@NeoLabHQ/context-engineering-kit

/reflect - Reflect on the previous response and output based on the self-refinement framework for iterative improvement with complexity triage and verification

/memorize - Curate insights from reflections and critiques into CLAUDE.md using Agentic Context Engineering

/critique - Comprehensive multi-perspective review using specialized judges with debate and consensus building

Automatic Reflection Hook - Triggers /reflect automatically when "reflect" appears in your prompt

The plugin is based on papers like Self-Refine and Reflexion . These techniques improve the output of large language models by introducing feedback and refinement loops.

They are proven to increase output quality by 8–21% based on both automatic metrics and human preferences across seven diverse tasks, including dialogue generation, coding, and mathematical reasoning, when compared to standard one-step model outputs.

On top of that, the plugin is based on the Agentic Context Engineering paper, which uses memory updates after reflection and consistently outperforms strong baselines by 10.6% in agent applications.

Review

Comprehensive code and PR review commands that use multiple specialized agents for thorough code quality evaluation with impact/confidence filtering.

/plugin install review@NeoLabHQ/context-engineering-kit

/review-local-changes - Comprehensive review of local uncommitted changes using specialized agents with code improvement suggestions

/review-pr - Comprehensive pull request review using specialized agents

/traiage-review - Pick the top most important files from huge changeset for human reviewer, to decrease amount of files that need to review before approving it.

This plugin uses multiple specialized agents for comprehensive code quality analysis:

bug-hunter - Identifies potential bugs, edge cases, and error-prone patterns

code-quality-reviewer - Evaluates code structure, readability, and maintainability

contracts-reviewer - Reviews interfaces, API contracts, and data models

historical-context-reviewer - Analyzes changes in relation to codebase history and patterns

security-auditor - Identifies security vulnerabilities and potential attack vectors

test-coverage-reviewer - Evaluates test coverage and suggests missing test cases

The traiage-review skill additionally uses four change-triage agents:

You can use this plugin to review code in GitHub Actions; to do so, follow this guide .

Git

Commands and skills for streamlined Git operations including commits, pull request creation, and advanced workflow patterns.

/plugin install git@NeoLabHQ/context-engineering-kit

/commit - Create well-formatted commits with conventional commit messages and emoji

/create-pr - Create pull requests using GitHub CLI with proper templates and formatting

/analyze-issue - Analyze a GitHub issue and create a detailed technical specification

/load-issues - Load all open issues from GitHub and save them as markdown files

/load-pr-comments - Load open/unresolved PR review comments and group them as tasks for parallel agents to fix.

/worktree - Create, compare, and merge git worktrees for parallel development with automatic dependency installation

git-notes - Skill for using git notes to add metadata to commits without changing history.

resolve-fixed-pr-comments - Verify what PR review comments have been addressed and resolve that are genuinely fixed or no longer relevant.

Test-Driven Development

Commands and skills for test-driven development with anti-pattern detection.

/plugin install tdd@NeoLabHQ/context-engineering-kit

/write-tests - Systematically add test coverage for local code changes using specialized review and development agents

/fix-tests - Fix failing tests after business logic changes or refactoring using orchestrated agents

test-driven-development - Introduces TDD methodology, best practices, and skills for testing using subagents

design-testing-strategy - Manual guide to design a plan for the best way to cover a given artifact with tests while minimizing effort and maximizing coverage.

test-coverage - Manual for choosing, applying, different types of coverage analysis (structural, mutation, requirements, API/integration) on an existing test suite.

Subagent-Driven Development

Execution framework for competitive generation, multi-agent evaluation, and subagent-driven development with quality gates.

/plugin install sadd@NeoLabHQ/context-engineering-kit

/launch-sub-agent - Launch focused sub-agents with intelligent model selection, Zero-shot CoT reasoning, and self-critique verification

/do-and-judge - Execute a single task with implementation sub-agent, independent judge verification, and automatic retry loop until passing

/do-in-parallel - Execute the same task across multiple independent targets in parallel with context isolation

/do-in-steps - Execute complex tasks through sequential sub-agent orchestration with automatic decomposition and context passing

/do-competitively - Execute tasks through competitive generation, multi-judge evaluation, and evidence-based synthesis to produce superior results

/tree-of-thoughts - Execute complex reasoning through systematic exploration of solution space, pruning unpromising branches, and synthesizing the best solution

/judge-with-debate - Evaluate solutions through iterative multi-judge debate with consensus building or disagreement reporting

/judge - Evaluate completed work using LLM-as-Judge with structured rubrics and evidence-based scoring

subagent-driven-development - Dispatches a fresh subagent for each task with code review between tasks, enabling fast iteration with quality gates

multi-agent-patterns - Design multi-agent architectures (supervisor, peer-to-peer, hierarchical) for complex tasks exceeding single-agent context limits

Spec-Driven Development

Comprehensive specification-driven development workflow plugin that transforms prompts into production-ready implementations through structured planning, architecture design, and quality-gated execution.

This plugin is designed to consistently produce working code. It was tested on real-life production projects by our team, and in 100% of cases, it generated working code aligned with the initial prompt. If you find a use case it cannot handle, please report it as an issue.

Key Features

Development as compilation — The plugin works like a "compilation" or "nightly build" for your development process: task specs → run /implement-task → working code . After writing your prompt, you can launch the plugin and expect a working result when you come back. The time it takes depends on task complexity — simple tasks may finish in 30 minutes, while complex ones can take a few days.

Benchmark-level quality in real life — Model benchmarks improve with each release, yet real-world results usually stay the same. That's because benchmarks reflect the best possible output a model can achieve, whereas in practice LLMs tend to drift toward sub-optimal solutions that can be wrong or non-functional. This plugin uses a variety of patterns to keep the model working at its peak performance.

Customizable — Balance result quality and process speed by adjusting command parameters. Learn more in the Customization section.

Time-efficient for developers — The overall process is designed to minimize developer time and reduce the number of interactions, while still producing results better than what a model can generate from scratch. However, overall quality is highly proportional to the time you invest in iterating and refining the specification.

Industry-standard — The plugin's specification template is based on the arc42 standard, adjusted for LLM capabilities. Arc42 is a widely adopted, high-quality standard for software development documentation used by many companies and organizations.

Works best in complex or large codebases — While most other frameworks work best for new projects and greenfield development, this plugin is designed to perform better the more existing code and well-structured architecture you have. At each planning phase, it includes a codebase impact analysis step that evaluates which files may be affected and which patterns to follow to achieve the desired result.

Simple — This plugin avoids unnecessary complexity and mainly uses just 3 commands, offloading process complexity to the model via multi-agent orchestration. /implement-task is a single command that produces working code from a task specification. To create that specification, you run /sdd:add-task and /plan-task , which analyze your prompt and iteratively refine the specification until it meets the required quality.

Quick Start

/plugin install sdd@NeoLabHQ/context-engineering-kit
# create .specs/tasks/draft/design-auth-middleware.feature.md file with initial prompt /add-task " Design and implement authentication middleware with JWT support " # write detailed specification for the task /plan-task .specs/tasks/draft/design-auth-middleware.feature.md # will move task to .specs/tasks/todo/ folder

Restart the Claude Code session to clear context and start fresh. Then run the following command:

# implement the task /implement-task @.specs/tasks/todo/design-auth-middleware.feature.md # produces working implementation and moves the task to .specs/tasks/done/ folder

/add-task - Create task template file with i