Agent SkillsScottRBK/forgetful › forgetful-context-gather

forgetful-context-gather

GitHub

在规划或实现任务前,通过多角度检索记忆、探索知识图谱及获取关联文档代码,生成包含决策、模式、约束和缺口的上下文包,为后续工作提供完整依据。

skills/forgetful-context-gather/SKILL.md ScottRBK/forgetful

Trigger Scenarios

需要深入理解任务背景后再进行编码或设计时 执行复杂功能开发前的准备工作

Install

npx skills add ScottRBK/forgetful --skill forgetful-context-gather -g -y
More Options

Use without installing

npx skills use ScottRBK/forgetful@forgetful-context-gather

指定 Agent (Claude Code)

npx skills add ScottRBK/forgetful --skill forgetful-context-gather -a claude-code -g -y

安装 repo 全部 skill

npx skills add ScottRBK/forgetful --all -g -y

预览 repo 内 skill

npx skills add ScottRBK/forgetful --list

SKILL.md

Frontmatter
{
    "name": "forgetful-context-gather",
    "tags": [
        "context",
        "retrieval",
        "workflow",
        "pre-work"
    ],
    "license": "MIT",
    "description": "Gather deep context before planning or implementing — one pass that turns a task description into a cited context pack: relevant decisions, patterns, constraints, code pointers, procedures, and explicit gaps. Runs recall from several angles, explores the graph around the strongest hits, and opens the linked material.",
    "allowed-tools": [
        "mcp__forgetful__discover_forgetful_tools",
        "mcp__forgetful__how_to_use_forgetful_tool",
        "mcp__forgetful__execute_forgetful_tool",
        "Bash(forgetful:*)"
    ],
    "disable-model-invocation": true
}

Gathering context before work

A single query answers a question; a context gather prepares a task. The output is a pack the work can lean on, with every claim cited by memory ID and every dry angle stated — silence is never ambiguous.

Invoking operations

Operations are named by registry name (query_memory, get_document, ...). Invoke via whichever surface this agent has:

  • MCP: execute_forgetful_tool(tool_name="query_memory", arguments={...})
  • CLI: forgetful call query_memory --args '{"query": "..."}' --json

Get any operation's schema at runtime: how_to_use_forgetful_tool (MCP) or forgetful tools info <operation> (CLI) — schemas are deliberately not repeated here.

Delegating this workflow to a subagent: hand it the CLI flavor — Bash travels into subagents, MCP tool access does not. Run MCP-flavored gathers in the main conversation.

Step 1 — Derive the query angles

From the task description, write 3–5 distinct angles: the feature area, the technology or library, exact error text or identifiers, the architectural layer, adjacent domains that share patterns. One angle is a spot-check; several are coverage.

Done when: the angles are listed before any query runs.

Step 2 — Recall per angle

query_memory per angle — query and query_context are both required, and query_context should carry the task's intent (per forgetful-recall: reads cross-project by default, identifiers verbatim, truncated handled). Skills referenced by name in this skill resolve via search_skillsexport_skill when not already available. Track which angles hit and which came up dry.

Done when: every angle has run and its outcome is recorded.

Step 3 — Explore around the strongest hits

Where hits reference entities or cluster into a topic, walk the graph (per forgetful-explore, medium depth): expand the memories, discover the entities, harvest what is attached to them.

Done when: the strongest hits have their neighbourhood mapped, not just their own text.

Step 4 — Open the linked material

Hits point outward — follow the pointers: get_document for linked documents, get_code_artifact for reusable code, search_skills + get_skill for procedures that already do the task, get_skill_links for what those procedures bundle.

Done when: load-bearing linked material is read, not just listed.

Step 5 — Sweep for unlinked material

Link-following only surfaces what a hit already points to — a document or code artifact that no surfaced memory links to stays invisible to that flow. Close the gap: list_documents and list_code_artifacts, scoped with project_id when the task is project-bound, then scan titles for relevance. search_skills already searches skills directly, so no separate sweep is needed there.

Done when: documents and code artifacts have been swept by title, not just reached by link.

Step 6 — Synthesize the pack

Assemble, in order of usefulness to the task:

  • Decisions that constrain the work (cited by memory ID)
  • Patterns and preferences that shape how it should be done
  • Constraints — things ruled out, with the reason
  • Code pointers — artifacts and source references worth opening
  • Procedures — stored skills that cover part of the task
  • Gaps — every angle that came up dry, stated as "no existing knowledge about X"

Done when: the pack cites its sources, states its gaps, and the task could start from it without re-querying.

Version History

  • 633cc1f Current 2026-07-25 08:21

Same Skill Collection

skills/forgetful-cli-setup/SKILL.md
skills/forgetful-encode-repo/SKILL.md
skills/forgetful-entities/SKILL.md
skills/forgetful-explore/SKILL.md
skills/forgetful-files/SKILL.md
skills/forgetful-mcp-setup/SKILL.md
skills/forgetful-procedures/SKILL.md
skills/forgetful-recall/SKILL.md
skills/forgetful-remember/SKILL.md

Metadata

Files
0
Version
0cc5b2b
Hash
78d07fe5
Indexed
2026-07-25 08:21

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 09:29
浙ICP备14020137号-1 $Carte des visiteurs$