跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
效率与协作

cp-skill-connect

Discover connections for a single artifact. Writes a connect-report under kb/reports/cache/connect/<collection>/ without mutating library artifacts or indexes. Use with an artifact path or artifact name.

zby · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add zby/commonplace --skill cp-skill-connect

技能说明


name: cp-skill-connect description: Discover connections for a single artifact. Writes a connect-report under kb/reports/cache/connect// without mutating library artifacts or indexes. Use with an artifact path or artifact name. type: kb/types/instruction.md user-invocable: true allowed-tools: Read, Write, Grep, Glob, Bash, Skill context: fork model: opus

Connect — Discovery Only

Find candidate connections for a single artifact and write them to a discovery report at kb/reports/cache/connect/<collection>/<artifact-name>.connect.md. The report is the only direct write this skill performs. Do not edit the source artifact, other artifacts, indexes, collection files, or logs.

Connect reports are gitignored; they are immediate downstream context and can be regenerated from the source artifact plus current KB state.

The skill owns execution. The type owns the report contract. Use this skill for routing, setup, tool use, delegated skill calls, and file writes. Use the loaded type spec for section meanings, quality standards, and the template. If the skill and type both mention the same report-content rule, prefer the type.

Input

Target: $ARGUMENTS — one artifact path or artifact name. If none provided, ask which artifact to connect. Determine the source collection from the artifact's path (kb/notes/ -> notes, kb/reference/ -> reference, etc.).

Setup

  1. Determine the source collection from the target artifact's path (kb/notes/... -> notes, kb/reports/retained/foo.md -> reports, etc.). Hard fail immediately if kb/<source-collection>/COLLECTION.md does not exist — do not attempt discovery, do not fall back to defaults, do not soldier on. Report the missing file path to the user and stop. The COLLECTION.md is the only linking-rules surface; without it the skill has no authorised destinations or labels and any output would be invented.

  2. Read kb/reports/types/connect-report.md before candidate discovery. It defines the report sections, quality standards, and template you will use while judging candidates.

  3. Read the target artifact fully. Identify its claim, mechanism, implications, scope, and tensions. If the target has no frontmatter (text file), continue discovery from its title/body and mark the report as provisional.

  4. Read kb/<source-collection>/COLLECTION.md and find its outbound-linking section (heading varies — look for the one that names destinations and labels). Read it as authoritative guidance — extract three things, regardless of whether the section is structured as per-destination blocks, a single labels table with a destinations column, prose, or any mix:

    • Which local destination collections to prospect from this source (and which are excluded), and whether the reserved external destination is authorized. The destination wildcard any includes external.
    • Which labels are authorised for which source->destination pairs, with the reader-need each label serves.
    • Any direction or composition hints — inverse-edge expectations, rare/common edges, frontloading posture, sub-agent invocation preferences. The skill below leans on these for reverse-edge candidates and for tightening prospecting on rare edges.

    This is the only linking-rules surface. There is no compiled topology and no separate vocabulary doc to consult.

  5. Treat the installed KB goals from always-loaded AGENTS.md as an outer scope check, not as a replacement for collection label authorisation. kb/reference/control-plane-goals.md documents this always-loaded goal-frame invariant, including forked skill contexts, so connect does not add a separate goal-loading step.

  6. Use repo-local discovery only: curated indexes, scoped rg, and link following. Do not call external semantic-search tools or MCP search services; connect must work in Codex without external search state. Complete generated listings (dir-index.md, tag tails) are build-time site artifacts and do not exist in the repo (ADR 025).

Discovery — per destination

Connect is the skill that pays the cost of active search. The write skill is bounded to a targeted duplicate check + already-loaded context + user-named targets; connect runs the full prospecting procedure on every local destination collection the source's COLLECTION.md permits.

Active depth: standard (quick: index-only single pass; deep: full discovery, multiple passes, synthesis detection).

Capture discovery trace throughout — indexes read, actual query strings, candidate evaluations, and links followed. A trace with only keywords is insufficient.

For each local destination collection authorised by the source's outbound section:

1. Decide breadth from the source COLLECTION.md's guidance

Use the outbound section's triggers, latitude cues, and direction hints to set prospecting breadth. If the source has no plausible match for a destination's trigger, note that in the trace and skip that destination.

The reserved external destination is authorization for already-known targets, not a prospecting surface. Do not search or browse the open web for candidates. If an external target was supplied by the user or is already present in loaded context, it may be evaluated under the collection's external rules; otherwise record that external prospecting is skipped.

2. Prospect using repo-local tools

In order of cost:

  • Curated heads. Read the destination's README.md and, when the source carries tags:, the matching <tag>-README.md pages — their editorial groupings and context phrases capture routing signal a flat listing misses. If a tag-README declares complete: true, it links every note carrying that tag — skip the by-tag rg for that tag and record the skip in the discovery trace.
  • Full titles listing. Generate the complete claim-title surface for the destination collection once, fresh (nothing is stored, so nothing can go stale) — titles are claims in th
阅读完整来源 ↗