Community编程与开发github.com

wshobson/superself

当一个项目通过 Superself 管理其状态时使用(即在 AGENTS.md 或 CLAUDE.md 中的 `<!-- superself:begin` 块内,或通过 `self setup` 解析当前目录到已注册的项目):在会话开始时读取 `self context`,将工作附加到工作单元,提交报告并附上证据,记录已确认的决策,以便下一个会话从当前断点继续。

superself 是什么?

Superself 是一个 Apache-2.0 许可的 CLI 工具(`npm install -g [email protected]`,需要 Node 22.12+),它通过一个独立的 git 仓库(与代码仓库分离)以仅追加的事件日志形式对项目状态进行版本控制——包括目标、决策、工作单元和报告。状态按需衍生,因此无需手动维护。该技能指导 AI 代理如何通过 `self` CLI 读取和写入该状态。它适用于任何在其 AGENTS.md 或 CLAUDE.md 中包含 Superself 管理块的项目,或通过 `self setup` 命令成功解析到已注册项目的工作目录。核心工作流程包括:在会话开始时运行 `self context` 获取当前真实状态,将实质性工作附加到工作单元,提交报告时自动附加当前 HEAD 提交作为证据,并记录用户已确认的决策。该技能提供了详细的规则以确保状态的可信度,例如记录必须用英文编写、禁止手动编辑生成的状态文件,以及在首次使用时正确初始化项目。它通过 `--supersedes` 和 `retract` 等命令支持记录修正和撤销,确保状态变更的可追溯性。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/wshobson/agents/tree/main/plugins/superself/skills/superself

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

superself 是做什么的?

Superself 是一个 Apache-2.0 许可的 CLI 工具(npm install -g [email protected],需要 Node 22.12+),它通过一个独立的 git 仓库(与代码仓库分离)以仅追加的事件日志形式对项目状态进行版本控制——包括目标、决策、工作单元和报告。状态按需衍生,因此无需手动维护。该技能指导代理如何通过 self CLI 读取和写入该状态。它由 Superself 作者维护:https://github.com/fxylabs/superself

何时适用此技能

  • 项目的 AGENTS.md 或 CLAUDE.md 中包含一个介于 <!-- superself:begin 和 <!-- superself:end --> 之间的块,或者 self setup 命令打印出了当前目录所解析的工作区、项目及存储库。
  • 当 self --version 失败时跳过此技能:该项目未使用 Superself,且以下所有内容不应手动创建。此技能针对 [email protected] 编写;不同的大版本或小版本可能移动了某个动词或标志,因此在依赖它们之前请使用 self <command> --help 进行检查。

会话开始

  1. 运行 self context,并将其输出视为当前的真实状态:包括目标、活跃决策和约定、进行中的工作、最近的报告。这些内容由日志折叠生成,绝不手动编写。
  2. 如果上下文中缺少某些内容,是因为它们被有意排除在渲染集之外;self search <query> 可以找到上下文遗漏的活跃记录,self work show <id> 打印单个工作单元的完整简介和报告历史。

工作过程中

  • 实质性工作应附加到一个工作单元。使用 self work add "<必需的结果>" 创建一个——结果是指必须成为现实的状态,而非任务——然后使用 self work start <id>。start 会读取简介并记录当前会话接管了该单元;如果另一个会话已持有它,CLI 会显示谁以及从何时开始持有,但不会拒绝。请自行判断并继续。
  • 提交后,使用 self report <id> "<发生了什么>" 报告进度。当前 HEAD 提交会自动作为证据附加;--evidence <commit|note> 附加其他内容,--file <path> 附加更长的简介。
  • 记录用户已确认的决策:self decide "<文本>" --why "<原因>"。当用户尚未确认时使用 --proposed。每个事件记录一个决策。
  • 遇到阻塞?使用 self work block <id> --on decision|dependency|external --why "..."。任务被替代或移动?使用 self work retire <id> --why "..." [--successor <id>]。切勿将此类单元标记为完成,也不应错误地标记为阻塞。
  • 发现目标与当前状态之间存在差距?使用 self work propose 及其简介来提议工作;用户接受或拒绝。
  • 用户批准了下一步或继续?立即使用 self work add 及其背景进行注册。仅存在于对话中的计划会在对话结束时丢失。

结束工作

  • self work done <id> 仅当报告包含提交或工件时,或者“完成”本身说明了可验证发生的事件时才关闭一个工作单元:self work done <id> --report "<可验证发生的事情>"。空声明会被拒绝,并且声明的标准会阻止关闭,直到每一条都得到满足。
  • 记录文本一旦确认即不可变。通过重新声明进行更正:在任何添加动词上使用 --supersedes <id> 记录新措辞并保持谱系。retract 撤回一条记录,且不替换它。

保持状态可信的规则

  • 记录——事件、决策、报告、约定——使用英文编写,以便后续任何人可以阅读;用用户自己的语言回答他们的问题。
  • 分支通过拉取请求合并到主分支:PR 审查和 CI 控制合并权限。Superself 拥有上下文和工作图的所有权,而非合并门禁。
  • 切勿手动编辑生成的状态文件或 .superself/ 下的任何内容。
  • 在不包含 superself 块的项目中,首先运行 self setup。如果它将目录解析到已注册的项目,请询问用户是否运行 self connect,该命令会将受管理的块写入 AGENTS.md 或 CLAUDE.md。如果未解析到任何项目,请询问是否使用 self project init 进行注册。切勿自行注册或连接项目。

深入学习

self --help 列出所有动词;self <command> --help 打印单个命令的标志,且不触及状态。主题指南随 CLI 附带:

  • self help agents——会话如何从头到尾驱动此 CLI
  • self help context——self context 渲染什么,以及为何某些内容缺失
  • self help records——每种记录类型背后的实体,以及如何更正记录
  • self help placement——范围、优先级和曝光度——记录如何获得在上下文中的位置
  • self help work——工作图:结果、证据、标准和提议
  • self help goals——长期目标、目标、里程碑以及实现目标所需的条件
  • self help workspace——存储库、其中的项目以及如何在机器间移动它

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

wshobson/accessibility-compliance

Implement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.

wshobson/airflow-dag-patterns

Build production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.

wshobson/angular-migration

Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.

wshobson/anti-reversing-techniques

Understand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.

wshobson/api-design-principles

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

wshobson/architecture-decision-records

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

wshobson/architecture-patterns

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.

wshobson/async-python-patterns

Master Python asyncio, concurrent programming, and async/await patterns for high-performance applications. Use when building async APIs, concurrent systems, or I/O-bound applications requiring non-blocking operations.

wshobson/attack-tree-construction

Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.

wshobson/auth-implementation-patterns

Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.

wshobson/avoid-ai-writing

Audit and rewrite prose so it stops reading as machine-generated. Use this skill when asked to remove AI-isms, clean up AI writing, edit a draft for AI tells, audit a README, changelog, release note, PR description, or blog post for machine-sounding prose, or make text sound less like AI. Supports a detect-only mode, a rewrite mode, and an edit-in-place mode, with optional voice and context profiles.

wshobson/backtesting-frameworks

Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.

wshobson/bash-defensive-patterns

Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.

wshobson/bats-testing-patterns

Master Bash Automated Testing System (Bats) for comprehensive shell script testing. Use when writing tests for shell scripts, CI/CD pipelines, or requiring test-driven development of shell utilities.

wshobson/bazel-build-optimization

Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.

wshobson/before-you-build

Pre-build product and feature risk review for founders, product managers, and AI-assisted builders. Use this skill when the user is about to build a landing page, MVP, SaaS product, internal tool, agent workflow, or major feature and needs to check demand, positioning, monetization, retention, trust, distribution, and adoption risk before implementation starts.

wshobson/billing-automation

Build automated billing systems for recurring payments, invoicing, subscription lifecycle, and dunning management. Use when implementing subscription billing, automating invoicing, or managing recurring payment systems.

wshobson/binary-analysis-patterns

Master binary analysis patterns including disassembly, decompilation, control flow analysis, and code pattern recognition. Use when analyzing executables, understanding compiled code, or performing static analysis on binaries.

wshobson/block-no-verify-hook

Configure a PreToolUse hook to prevent AI agents from skipping git pre-commit hooks with --no-verify and other bypass flags. Use when setting up Claude Code projects that enforce commit quality gates.

wshobson/brand-landingpage

Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens — use frontend-design instead.

相关技能