Community程式設計與開發github.com

wshobson/superself

當專案狀態由 Superself 管理時使用(`AGENTS.md` 或 `CLAUDE.md` 中的 `<!-- superself:begin` 區塊,或 `self setup` 可將目錄解析為已註冊專案):在會話開始時讀取 `self context`,將工作附加到工作單元,附上證據進行報告,並記錄已確認的決策,以便下一個會話能從中斷處繼續。

superself 是什麼?

Superself 是一個 Apache-2.0 授權的命令列工具(`npm install -g [email protected]`,需要 Node 22.12+),它將專案的狀態(目標、決策、工作單元、報告)作為僅追加的事件日誌,版本控制於一個與程式碼分離的 Git 儲存庫中。狀態是按需推導出來的,因此無需手動維護任何內容。此技能指示 AI 代理如何透過 `self` CLI 讀寫該狀態。它適用於 `AGENTS.md` 或 `CLAUDE.md` 中包含 Superself 區塊的專案,或已透過 `self setup` 解析的已註冊專案。支援的平台包括 Claude Code、Cursor、Codex 等可執行 CLI 的代理環境。工作流程為:會話開始時執行 `self context` 取得當前事實,將所有實質工作附加到工作單元(`self work add`),提交後透過 `self report` 報告進度(自動附加 HEAD 提交作為證據),並以 `self decide` 記錄決策。關閉工作單元時需要可驗證的證據,否則會被拒絕。不允許手動編輯生成狀態檔案或 `.superself/` 目錄下的內容。

相容平台✓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 授權的命令列工具(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> 僅在報告附有提交或工件,或者 done 本身說明了可驗證發生的事情時,才會關閉一個單元: 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.

相關技能