Agent skill

Knowledge Workspace Resource Snapshots And Project Instructions

by echoVic in echoVic/blade-code

覆盖按 source project 隔离的 Agent/模型资源、Session 不可变快照、通信风格以及静态与路径条件项目规则。

MITAuto-check passed

Install Knowledge Workspace Resource Snapshots And Project Instructions

skills CLI
$ npx skills add echoVic/blade-code --skill knowledge-workspace-resource-snapshots-and-project-instructions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install echoVic/blade-code knowledge-workspace-resource-snapshots-and-project-instructions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/echoVic/blade-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.trae/knowledges/workspace-policy-and-shared-foundations/workspace-resource-snapshots-and-project-instructions .claude/skills/knowledge-workspace-resource-snapshots-and-project-instructions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
knowledge-workspace-resource-snapshots-and-project-instructions
GitHub stars
181
Token cost
~1.9k tokens
SKILL.md length
367 words
Files
1
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

覆盖按 source project 隔离的 Agent/模型资源、Session 不可变快照、通信风格以及静态与路径条件项目规则。

  • Tasks that involve Git worktrees
  • SKILL.md covers Module Structure, API Surface, Usage Examples and Gotchas, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Knowledge Workspace Resource Snapshots And Project Instructions is an agent skill from echoVic/blade-code. 覆盖按 source project 隔离的 Agent/模型资源、Session 不可变快照、通信风格以及静态与路径条件项目规则。 使用时机:新增 workspace 资源来源、创建或恢复 Session、处理 Task worktree、刷新插件、注入 AGENTS/CLAUDE/BLADE 规则或校验 provenance。 不包含:Folder Trust 决策实现见 permissions-and-workspace-trust,通用配置层级见 layered-configuration-and-runtime-settings。 关键词:WorkspaceAgentResources, SessionAgentResources, WorkspaceModelResources, ProjectRuleCatalog, contextualRules, projectInstructionsDigest。

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: AI-powered CLI coding agent with 20+ built-in tools, MCP support, and multi-model providers. The licence is MIT.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/knowledge-workspace-resource-snapshots-and-project-instructions”

What it can do on your machine

Read from SKILL.md and the folder at commit ee237e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Knowledge Workspace Resource Snapshots And Project Instructions loads about 1.9k tokens when it runs. Until then it costs about 120 tokens; SKILL.md has 367 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from echoVic/blade-code at commit ee237e7, republished under its MIT licence (© echoVic). 367 words, ~1,873 tokens.

Download SKILL.mdSave it as .claude/skills/knowledge-workspace-resource-snapshots-and-project-instructions/SKILL.md (or your agent's skills folder).
name
knowledge-workspace-resource-snapshots-and-project-instructions
description
覆盖按 source project 隔离的 Agent/模型资源、Session 不可变快照、通信风格以及静态与路径条件项目规则。 使用时机:新增 workspace 资源来源、创建或恢复 Session、处理 Task worktree、刷新插件、注入 AGENTS/CLAUDE/BLADE 规则或校验 provenance。 不包含:Folder Trust 决策实现见 permissions-and-workspace-trust,通用配置层级见 layered-configuration-and-runtime-settings。 关键词:WorkspaceAgentResources, SessionAgentResources, WorkspaceModelResources, ProjectRuleCatalog, contextualRules, projectInstructionsDigest。

Module Structure

该组件把进程内可刷新 workspace registry 转换为 Session 私有快照,并以 source project 为资源身份、以 execution workspace 为文件操作位置。

Directory Layout
  • packages/cli/src/agent/resources/WorkspaceAgentResources.ts — workspace registry 聚合、容量、刷新和 Session 快照
  • packages/cli/src/agent/resources/WorkspaceModelResources.ts — 模型配置与 PiModelCatalog 的 Session 隔离
  • packages/cli/src/agent/resources/WorkspaceCommunicationStyles.ts — 用户、项目和插件输出风格目录
  • packages/cli/src/agent/resources/WorkspaceProjectRules.ts — 项目规则发现、优先级、路径匹配和 provenance
  • packages/cli/src/prompts/projectInstructions.ts — 无 ProjectRuleCatalog 时的兼容指令加载器
  • packages/cli/src/agent/runtime/SessionRuntime.ts — 快照创建、规则水合和 source/execution 路径映射
  • packages/cli/src/agent/loop/executeLoopGenerator.ts — 条件规则注入与首次写入屏障
Key Entry Points
  • resolveWorkspaceAgentResources() — 获取或初始化指定 workspace 的可刷新资源集合
  • withWorkspaceAgentResources() — 在 active-user pin 内执行异步管理操作
  • snapshotWorkspaceAgentResources() — 深复制 registry、Hook、风格和规则到 Session
  • resolveWorkspaceModelResources() — 重建目标项目的模型配置和私有 catalog
  • ProjectRuleCatalog.staticRules() / contextualRules() / hydrate() — 静态注入、路径触发和恢复校验

API Surface

WorkspaceAgentResources
  • resolveWorkspaceAgentResources(workspaceRoot, options) — 适合短时读取;返回后通过 deferred release 解除 active pin
  • withWorkspaceAgentResources(workspaceRoot, operation, options) — 在整个异步 operation 期间保持资源不可驱逐
  • snapshotWorkspaceAgentResources(resources) — 生成 Session-owned registry、Hook、风格和规则快照
  • resetWorkspaceAgentResources() — 递增 generation、清空缓存并释放所有 registry 单例
  • getWorkspaceAgentResourceCacheStats() — 暴露 resident、in-flight 和 active-user 计数
WorkspaceModelResources
  • resolveWorkspaceModelResources(projectRoot, startupConfig) — 返回深复制配置与 Session 私有 catalog
  • snapshotWorkspaceModelResources(resources) — 再复制配置并以原 CredentialStore 创建新 catalog
  • cloneWorkspaceModelConfig(config) — 深复制普通对象和数组,保留函数类运行时值
ProjectRuleCatalog
  • list() — 仅返回规则元数据和 digest
  • staticRules(sourceWorkspaceRoot, maxBytes?) — 解析 Session 初始作用域内的无条件规则
  • contextualRules(sourceWorkspaceRoot, targetPaths, loadedIds, maxBytes?) — 按工具目标路径选择尚未加载的规则
  • hydrate(references) — 用持久化引用重建正文并验证 ID、路径、来源和 digest
  • snapshot() — 固化定义与 pattern 数组,隔离后续磁盘和 registry 变化

Usage Examples

Session 创建时冻结 Agent 资源
typescript
const resources = this.options.agentResources
  ? this.options.agentResources
  : await resolveWorkspaceAgentResources(this.projectRoot, {
      reconcilePlugins: true,
    });
this.agentResources = snapshotWorkspaceAgentResources(resources);
写入前加载路径条件规则
typescript
const projectRules = resolveInvocationRules(toolName, params);
if (projectRules?.files.length && registry.get(toolName)?.kind === 'write') {
  return {
    success: false,
    metadata: { contextualProjectRulesRequired: true },
  };
}

Gotchas

  • resolveWorkspaceAgentResources() 只为当前调用短暂增加 users,并通过 setImmediate 延迟释放;管理操作跨越多个 await 且要求资源不被 LRU 驱逐时必须使用 withWorkspaceAgentResources() (packages/cli/src/agent/resources/WorkspaceAgentResources.ts)
  • workspace registry 是可刷新对象,不能直接暴露给活动模型;只有 snapshotWorkspaceAgentResources() 深复制后的 registry、Hook 和目录才保证一个 Session 内工具描述与执行查找一致 (packages/cli/src/agent/resources/WorkspaceAgentResources.ts, packages/cli/tests/unit/services/workspace-agent-resources.test.ts)
  • idle registry 上限为 32,初始化中或 active-user entry 的硬上限为 64;全部 entry 被 pin 时新 workspace 会在初始化前抛 WorkspaceAgentResourceCapacityError (packages/cli/src/agent/resources/WorkspaceAgentResources.ts, git:2db1b230)
  • 初始化任一 registry 或插件集成失败时,已创建的 Subagent/Skill/Command/Plugin 单例必须全部 release;保留半初始化 generation 会污染下一次解析 (packages/cli/src/agent/resources/WorkspaceAgentResources.ts)
  • resetWorkspaceAgentResources() 通过 generation 让迟到的初始化结果自毁;仅清空 Map 而不检查 generation 会让并发旧 Promise 重新写回已撤销资源 (packages/cli/src/agent/resources/WorkspaceAgentResources.ts)
  • Task worktree 的 workspaceRoot 不是资源根;模型、插件、Hook、项目规则和默认配置继续来自 original source projectRoot,条件规则路径再从 worktree 映射回 source project (packages/cli/src/agent/runtime/SessionRuntime.ts, docs/reference/workspace-agent-resources.md)
  • 项目规则只有 Folder Trust 为 trusted 才发现;不可信项目返回空 catalog,而不是降级读取根 AGENTS.md (packages/cli/src/agent/resources/WorkspaceProjectRules.ts)
  • 同一目录存在 AGENTS.override.md 时会完全跳过 AGENTS.md;它不是追加层,误把二者都注入会产生相互冲突的指令 (packages/cli/src/agent/resources/WorkspaceProjectRules.ts)
  • 路径条件规则首次命中 Write/Edit/ApplyPatch 时会在任何副作用前返回 validation error,注入规则后要求模型下一轮重提写入;不能在当前调用中继续执行原参数 (packages/cli/src/agent/loop/executeLoopGenerator.ts)
  • contextual rule 正文不写入 transcript,只持久化 reference 和 digest;恢复时 hydrate() 发现内容、路径或来源漂移会 fail closed,避免静默改变历史 Session 的指令 (packages/cli/src/agent/resources/WorkspaceProjectRules.ts, packages/cli/src/agent/runtime/SessionRuntime.ts)
  • 规则预算按从最具体、最高优先级一端反向保留完整文件,超预算文件会整体跳过而不是截断;依赖文件前半段被保留的逻辑会得到错误结果 (packages/cli/src/agent/resources/WorkspaceProjectRules.ts)
  • Session 模型 catalog 与配置是私有副本,但 CredentialStore 有意共享;修改全局 catalog 或磁盘 endpoint 不影响活动 Session,修改同一渠道凭据仍可能影响后续请求 (packages/cli/src/agent/resources/WorkspaceModelResources.ts)
  • 自定义通信风格对单文件、prompt、总字节、目录深度和隐藏控制字符都有独立限制;单个坏文件只记 warning 并跳过,但总目录超限会使整个解析失败 (packages/cli/src/agent/resources/WorkspaceCommunicationStyles.ts)
Show full SKILL.md (97 more words)Show less

Architecture

  • 每个 canonical workspace 聚合 Subagent、Skill、Command、Plugin、CommunicationStyle 和 ProjectRule registry;插件先初始化,再把 namespaced 资源集成进同一 workspace 的各 registry (packages/cli/src/agent/resources/WorkspaceAgentResources.ts)
  • Agent 资源与模型资源分开快照:前者冻结模型可见扩展,后者冻结 Provider definitions 和模型路由,两者在 SessionRuntime 创建时共同绑定 (packages/cli/src/agent/resources/WorkspaceAgentResources.ts, packages/cli/src/agent/resources/WorkspaceModelResources.ts)
  • 项目规则按目录深度、同层文件优先级和路径 pattern 组成确定性目录;静态规则进入初始 system prompt,条件/深层规则在工具触达路径后增量进入下一次 Provider 请求 (packages/cli/src/agent/resources/WorkspaceProjectRules.ts, packages/cli/src/prompts/builder.ts)

Decisions

  • Session 使用不可变快照而不是实时 registry,是为了让插件启停、trust revoke 和磁盘规则变化不能改变已经暴露给模型的工具与系统提示 (docs/reference/workspace-agent-resources.md)
  • 项目规则持久化 provenance 而不持久化正文,在保持 transcript 有界的同时强制恢复时验证历史指令语义 (docs/reference/trusted-contextual-project-rules.md)
  • 模型 catalog 只共享安全 CredentialStore,不共享 Provider definitions,允许同一进程中相同 provider/model ID 在不同项目指向不同 endpoint (packages/cli/src/agent/resources/WorkspaceModelResources.ts, packages/cli/tests/unit/services/workspace-model-resources.test.ts)

Consumer Analysis

  • SessionRuntime 在创建和恢复时消费 Agent/Model 快照,并验证项目规则与通信风格 digest (packages/cli/src/agent/runtime/SessionRuntime.ts)
  • 子代理与 Team Runtime 继承父快照后再次复制,保持嵌套任务资源视图稳定 (packages/cli/src/agent/subagents/, packages/cli/src/agent/teams/)
  • Task、Team、Skill 和 SlashCommand 工具通过闭包绑定 Session registry,不回查全局单例 (packages/cli/src/tools/builtin/)
  • 多项目 Session、模型、插件、Hook、Skill 和 suggestions 路由按请求目录获取精确 workspace 资源 (packages/cli/src/server/routes/)
  • Prompt builder 与 Agent loop 分别消费静态规则和按工具路径动态加载的 contextual rules (packages/cli/src/prompts/builder.ts, packages/cli/src/agent/loop/executeLoopGenerator.ts)

© echoVic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .trae/knowledges/workspace-policy-and-shared-foundations/workspace-resource-snapshots-and-project-instructions of echoVic/blade-code.

Open the folder on GitHubat commit ee237e7

Compare with similar skills

Knowledge Workspace Resource Snapshots And Project Instructions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Knowledge Workspace Resource Snapshots And Project Instructions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knowledge Workspace Resource Snapshots And Project Instructions this skillechoVic/blade-code181—~1.9kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Orca CLIstablyai/orca89k2 repos~593Automated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Finishing A Development Branchfarm-fe/farm5.6k34 repos~1.8kAutomated safety check: PassMIT
Process Inboxtelegramdesktop/tdesktop33k1 repos~5.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Orca CLI

    stablyai/orca

    Operate Orca-managed worktrees, folder contexts, terminals, repos, automations, artifacts, skill sharing, worktree comments, and Orca's embedded browser…

    89k GitHub starsUsed in 2 repos~593 tokens
    Agent WorkflowsAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 34 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Process Inbox

    telegramdesktop/tdesktop

    Process the local ignored ai-tdesktop inbox into durable, independently testable Telegram Desktop task records while task execution worktrees remain active.

    33k GitHub starsUsed in 1 repo~5.4k tokens
    Productivity & AutomationAuto-check passed
  • Canvas Capture Extension

    remotion-dev/remotion

    Official

    Rebuild, install, and reload the private Remotion Canvas Capture unpacked Chrome extension.

    63k GitHub stars~907 tokensUpdated today
    Media & CreativeAuto-check passed

More from echoVic/blade-code

All 38 skills in this repo
  • Base64 Parser

    echoVic/blade-code

    Base64 编解码工具,支持编码/解码文本、JSON、二进制文件,自动检测格式,支持批量处理. An agent skill from echoVic/blade-code.

    181 GitHub stars~545 tokensUpdated today
    Auto-check: notes
  • Code Review

    echoVic/blade-code

    Review frontend code for best practices, bugs, and improvements.

    181 GitHub stars~377 tokensUpdated today
    Auto-check: notes
  • GitHub Explorer

    echoVic/blade-code

    Explore and summarize popular GitHub projects. An agent skill from echoVic/blade-code.

    181 GitHub stars~434 tokensUpdated today
    Auto-check passed
  • 覆盖 Session 级 LSP 配置快照、stdio 进程、文档同步、语义查询、诊断回注、崩溃恢复 和子 Session 继承。进入条件:新增语言服务器、修改 LSP 工具、排查诊断缺失/重复、 处理 worktree 或 ACP 差异、修复进程泄漏或 transport 代际问题。不包含:VS Code 扩展桥接(见…

    181 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • 覆盖 SkillRegistry、SKILL.md 延迟加载、自定义命令 Markdown 解析、来源覆盖、插件 命名空间、Session 快照和模型/用户调用入口。进入条件:新增 Skill 或命令字段、调整 发现优先级、调试 /command 或 Skill 工具、修改 Prompt 元数据或消费者集成。不包含: 插件安装生命周期(见…

    181 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Covers 领域能力如何包装成内置工具、getBuiltinTools 的 Session 依赖注入、ToolSearch 延迟激活,以及 Goal/Task/Team/Plan/Skill/LSP/MCP/Web/Config/Worktree 适配边界。

    181 GitHub stars~2.1k tokensUpdated today
    Auto-check passed

Questions about Knowledge Workspace Resource Snapshots And Project Instructions

What does Knowledge Workspace Resource Snapshots And Project Instructions do?

覆盖按 source project 隔离的 Agent/模型资源、Session 不可变快照、通信风格以及静态与路径条件项目规则。. Knowledge Workspace Resource Snapshots And Project Instructions is an agent skill from echoVic/blade-code.

When should I use Knowledge Workspace Resource Snapshots And Project Instructions?

Knowledge Workspace Resource Snapshots And Project Instructions fits situations like: tasks that involve Git worktrees.

How do I install Knowledge Workspace Resource Snapshots And Project Instructions in Claude Code?

Run `npx skills add echoVic/blade-code --skill knowledge-workspace-resource-snapshots-and-project-instructions -a claude-code`. Or copy the skill folder (.trae/knowledges/workspace-policy-and-shared-foundations/workspace-resource-snapshots-and-project-instructions in echoVic/blade-code) into .claude/skills/knowledge-workspace-resource-snapshots-and-project-instructions in your project. Claude Code loads it when a task matches its description.

How do I install Knowledge Workspace Resource Snapshots And Project Instructions in Codex?

Run `npx skills add echoVic/blade-code --skill knowledge-workspace-resource-snapshots-and-project-instructions -a codex`. Or copy the skill folder (.trae/knowledges/workspace-policy-and-shared-foundations/workspace-resource-snapshots-and-project-instructions in echoVic/blade-code) into .agents/skills/knowledge-workspace-resource-snapshots-and-project-instructions in your project. Codex loads it when a task matches its description.

Can I use Knowledge Workspace Resource Snapshots And Project Instructions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add echoVic/blade-code --skill knowledge-workspace-resource-snapshots-and-project-instructions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-workspace-resource-snapshots-and-project-instructions, .gemini/skills/knowledge-workspace-resource-snapshots-and-project-instructions, .github/skills/knowledge-workspace-resource-snapshots-and-project-instructions and .opencode/skills/knowledge-workspace-resource-snapshots-and-project-instructions in your project.

What does Knowledge Workspace Resource Snapshots And Project Instructions need to run?

SKILL.md names no scripts, command-line tools or credentials: Knowledge Workspace Resource Snapshots And Project Instructions is instructions for the agent only.

Does Knowledge Workspace Resource Snapshots And Project Instructions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Knowledge Workspace Resource Snapshots And Project Instructions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Knowledge Workspace Resource Snapshots And Project Instructions use?

Knowledge Workspace Resource Snapshots And Project Instructions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Knowledge Workspace Resource Snapshots And Project Instructions use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Knowledge Workspace Resource Snapshots And Project Instructions?

Skills that share tags, products or a category with Knowledge Workspace Resource Snapshots And Project Instructions: Finishing a Development Branch (obra/superpowers, 297k stars), Orca CLI (stablyai/orca, 89k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and Finishing A Development Branch (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knowledge Workspace Resource Snapshots And Project Instructions?

echoVic (a GitHub user) maintains it in echoVic/blade-code, which has 181 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on October 10, 2026.

Source: echoVic/blade-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.