context-engineering

context-engineering is a skill for Claude Code from vinvcn/addyosmani-agent-skills-zh. It costs 40 tokens per session (3,699 once invoked), scanned A, original, MIT.

A guide to organizing the information an AI coding assistant receives about a project, from persistent rules to task-specific files and test results.

In plain words
What is it for?
Use it when starting a coding session, switching between project areas, creating CLAUDE.md rules, or improving how project documentation is routed to the assistant.
Why use it?
It helps prevent the assistant from working with too little context or becoming distracted by too much irrelevant information.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Part of the agent-skills plugin — 26 skills, 10 commands, 4 agents shipped together

Good fit Use it when starting a coding session, switching between project areas, creating CLAUDE.md rules, or improving how project documentation is routed to the assistant.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vinvcn/addyosmani-agent-skills-zh/context-engineering
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vinvcn/addyosmani-agent-skills-zh --skill context-engineering
Clone the repo
git clone --depth 1 https://github.com/vinvcn/addyosmani-agent-skills-zh

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 26 skills, 10 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/context-engineering/github.svg)](https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/context-engineering)
Your own site
<a href="https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/context-engineering"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/context-engineering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/context-engineering"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/context-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.03699
Opus 5.5 $0.00016 $0.01480
Sonnet 5.5 $0.00008 $0.00740
Haiku 4.5 $0.00004 $0.00370

Measured 1mo ago against content hash 4f2ecd5c7c67, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/context-engineering/SKILL.md · 354 lines

How it starts

The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Engineering

概述

在正确的时间给 agent 提供正确的信息。上下文是影响 agent 输出质量的最大单一杠杆:太少,agent 会幻觉;太多,它会失去焦点。上下文工程就是有意识地策划 agent 看到什么、何时看到,以及内容如何组织。

何时使用

  • 开始新的编码会话
  • Agent 输出质量正在下降(模式错误、幻觉 API、忽略约定)
  • 在代码库的不同部分之间切换
  • 为新项目配置 AI 辅助开发
  • Agent 没有遵循项目约定

上下文层级

按从最持久到最短暂的顺序组织上下文:

┌─────────────────────────────────────┐
│  1. Rules Files (CLAUDE.md, etc.)   │ ← Always loaded, project-wide
├─────────────────────────────────────┤
│  2. Spec / Architecture Docs        │ ← Loaded per feature/session
├─────────────────────────────────────┤
│  3. Relevant Source Files            │ ← Loaded per task
├─────────────────────────────────────┤
│  4. Error Output / Test Results      │ ← Loaded per iteration
├─────────────────────────────────────┤
│  5. Conversation History             │ ← Accumulates, compacts
└─────────────────────────────────────┘

第 1 层:Rules 文件

创建一个跨会话持久存在的 rules 文件。这是你能提供的杠杆率最高的上下文。

CLAUDE.md(用于 Claude Code):

# Project: [Name]

## Tech Stack
- React 18, TypeScript 5, Vite, Tailwind CSS 4
- Node.js 22, Express, PostgreSQL, Prisma

## Commands
- Build: `npm run build`
- Test: `npm test`
- Lint: `npm run lint --fix`
- Dev: `npm run dev`
- Type check: `npx tsc --noEmit`

## Code Conventions
- Functional components with hooks (no class components)
- Named exports (no default exports)
- colocate tests next to source: `Button.tsx` → `Button.test.tsx`
- Use `cn()` utility for conditional classNames
- Error boundaries at route level

## Boundaries
- Never commit .env files or secrets
- Never add dependencies without checking bundle size impact
- Ask before modifying database schema
- Always run tests before committing

## Patterns
[One short example of a well-written component in your style]

其他工具的等价文件:

  • .cursorrules 或 .cursor/rules/*.md(Cursor)
  • .windsurfrules(Windsurf)
  • .github/copilot-instructions.md(GitHub Copilot)
  • AGENTS.md(OpenAI Codex)

第 2 层:Specs 与架构

开始一个 feature 时加载相关的 spec 章节。如果只有一节适用,就不要加载整份 spec。

高效: "这是我们 spec 中的认证章节:[auth spec content]"

Read the full file on GitHub · 354 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +64 lines 4f2ecd5c7c67
  2. 1mo ago First seen · 290 lines · 40 tokens per session scan A 3eb4d236c225

Subscribe to this mod's changes

context-engineering is a skill published in the GitHub repository vinvcn/addyosmani-agent-skills-zh (44 stars, last pushed 7d ago), licensed MIT. It adds 40 tokens to every session and 3,699 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories