Agents
简介
Agents
原始描述
Designs, debugs, evaluates, and hardens AI agents — the loop, tools, memory, context budget, cost, and escalation — independent of any framework. Use when an agent loops forever, repeats a tool call, drifts from its instructions after many turns, invents tool arguments, stops mid-task, or swallows a tool error silently; when deciding single agent versus several, or which framework to build on; when token cost per task or p95 latency has to come down; when designing tool schemas, retries, timeouts, checkpoints, or human approval; when writing an eval set or a regression suite for agent behavior; when prompt injection, tool abuse, or an over-permissioned action is the risk; and when specifying an agent's purpose, escalation rules, and cost ceiling for a team. Covers memory design, multi-agent handoffs, tracing, and rollout. Not for LangChain APIs (`langchain`), retrieval pipelines (`rag`), prompt craft alone (`prompting`), or agent persona and voice (`agent`).
通过你的 Agent 添加
安装目录:agents/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
Read when: changing a public API, adding a package, or editing skills/foldkit-plus/.
The foldkit-plus agent skill
skills/foldkit-plus/ is an
Agent Skill that teaches coding agents what each
package owns, when to use it, and basic examples. Users install it with
npx skills add doeixd/foldkit-plus --skill foldkit-plus
(skills.sh), which looks for skills/<name>/SKILL.md.
It is published documentation: writing-docs.md
says what its reader (a coding agent) needs from SKILL.md and from each
reference; the rules below are the mechanics.
Use it yourself, too: for what each package is for and a basic example of
each, read SKILL.md and the references/ file for the package at hand
before changing it.
- Layout.
SKILL.mdis the map: what Foldkit Plus is, which package owns which state, how they connect, one small example. It stays under ~150 lines, because an agent loads all of it once the skill triggers. Depth lives inreferences/<family>.md(surface,remote,sync,mirror,agent,mixins), one level deep, read only when needed. - Keep it in step with the API. A change that renames, removes, or
re-shapes a public API, or changes what a package owns, updates the matching
reference file in the same change. A new package gets a row in the
SKILL.mdtable and a place in a reference file. Bumpmetadata.versionon release. Each reference's first line,Checked against <package> <version>, …, names the versions in the tree when it was last checked against the code: set it to the currentpackage.jsonversions whenever you do that check, and only then. - Examples are executable claims here too. Every snippet must compile
against the current code: copy it with minimal fixtures into a temporary
*.test-d.tsin a project whose tsconfig maps the imported package names (examples/kitchen-sinkmaps all of them), runpnpm exec tsc -b <project>, prove the file is checked with a deliberate error, then delete it. Import from published names (foldkit-remote), never../src. - Links are absolute. The skill is installed without this repository, so
"See also" links are
https://github.com/doeixd/foldkit-plus/blob/main/...URLs; only links between files inside the skill are relative. - Frontmatter limits.
namematches the folder, lowercase and hyphens, at most 64 characters, no "claude" or "anthropic".descriptionis at most 1,024 characters, in the third person, naming the packages and the words a user would say, because it is all an agent sees when deciding to load the skill.