adding-skill-program

bởi posthog

Tạo một chương trình dựa trên kỹ năng mới cho trình hướng dẫn PostHog. Sử dụng khi thêm một loại chương trình (như phân tích doanh thu, kiểm toán, theo dõi lỗi) cài đặt một…

npx skills add https://github.com/posthog/wizard --skill adding-skill-program

Adding a Skill-Based Program

Read wizard-development for the shared design policy. Use Pi for new agent work and prefer an orchestrator flow. Linear runs are for very simple work and existing flows. The Anthropic SDK remains a supported legacy fallback, deprecated as the default for new work; the shared guide owns the fallback criteria and gateway model/effort/system-prompt contract.

These are contribution defaults. Current runtime bindings still default many programs to Anthropic plus linear; documentation changes do not migrate them.

Choose the contribution surface

  • Content-only capability: use the existing skill command machinery when it can express the workflow. Context-mill owns skill content and cliEntries. A new skill-backed child of an existing family ships through context-mill; inspect family dispatch. Unpromoted skills run through the skill command.
  • Native program: use a ProgramConfig when the wizard needs its own flow, screens, detection, composition, or other native behavior. Keep product instructions in context-mill.

Command names, program id, content-mill agentFlow, and skillId have different roles. Use the full product name for public commands. The config field is id, not the retired flowKey.

Build a native orchestrator program

Use metrics as the current Pi/orchestrator example and read the runner architecture when changing execution behavior.

  1. Add the program config under src/programs/<name>/. Set agentFlow when its content-mill flow differs from id; setting it explicitly also documents the content dependency. Keep a run definition so the outer runner executes agent work.
  2. Supply the flow's seed and task prompts in context-mill, including the task dependencies and applicable skill variants. The orchestrator loads agentFlow ?? id, requires a seed prompt, and checks task-skill variants before running. run.skillId alone does not define this flow.
  3. Register the config in PROGRAM_REGISTRY and add its Pi/orchestrator entry to PROGRAM_BINDINGS. Existing binding checks enforce coverage; ProgramId currently widens to string.
  4. For a standalone native command, create a command module with nativeCommandFactory and register it in main.ts. A native family child uses the handlers in family dispatch. Program registration derives screen sequences and store lookup, not the top-level CLI .use() chain.
  5. Check program OAuth scopes against the tools the program needs; add scopes only when the base set is insufficient.

Model and effort selections in flow frontmatter must be supported by the wizard and gateway. Follow the cross-repo procedure in wizard-development before introducing a model or changing gateway-required prompt material.

Simple linear programs and existing flows

For a very simple linear flow, use createSkillProgram to configure installation of one skill. Register the native program as above with an explicit Pi/linear binding; the factory does not select a sequence. Read SkillProgramOptions for required fields; audit demonstrates factory customization and a dynamic run(session) that seeds a ledger. Revenue analytics builds its config directly and adds prerequisite detection.

ProgramRun.customPrompt, abortCases, postRun, and buildOutroData are consumed by the linear sequence. postRun runs after success; buildOutroData receives session and credentials, with host information inside credentials. The orchestrator currently uses its own task prompts, failure handling, and outro, and does not invoke those hooks. Check this limitation before migrating a linear flow; setting an orchestrator binding does not preserve these behaviors automatically.

Screens, prerequisites, and composition

Reuse AGENT_SKILL_STEPS: intro, health check, auth, run, outro, and keep-skills. Auth also applies the shared AI opt-in gate for agent programs. Override screenId, not screen, when adapting a step. New screens need an entry in ScreenId, a component, and registration in screen-registry. Follow ink-tui for rendering and store usage.

Use a headless step's onReady for session-dependent detection, then render structured frameworkContext.detectError data in the intro. onInit runs when the TUI starts rendering with its initial session; onReady runs after the real session is assigned. See store hooks and run-wizard. The noninteractive runner also walks onReady by default; set ciPreRun only when it needs a different prerequisite strategy.

requires currently records metadata; it does not execute or enforce prior programs. Compose real work through ProgramStep.run, with onRunPrep and targetDir when needed. The integration run step and self-driving demonstrate this. Composed sub-runs are structurally linear; orchestrators cannot nest. A host run step without run can also set targetDir and onRunPrep to scope the program's own agent to a picked project and keep its sequence, as error-tracking does.

Validate the affected path

Reuse the relevant registry, binding, detection, or routing checks. Add a focused behavioral test only for a meaningful gap; avoid tests that repeat configuration fields. Check that the selected CLI route resolves the intended program and that its content-mill flow is available. Use the exploration guide for a warranted end-to-end run against a disposable app. Follow wizard-development for proportionate checks; documentation-only changes need source/link verification.

Thêm skills từ posthog

error-tracking-hono
posthog
Theo dõi lỗi PostHog cho Hono
tuning-incremental-sync-config
posthog
Cấu hình của một đồng bộ nằm trên ExternalDataSchema và có thể được thay đổi bất kỳ lúc nào qua external-data-schemas-partial-update. Hầu hết các thay đổi đều không phá hủy (có hiệu lực vào lần đồng bộ tiếp theo), nhưng một số thay đổi (chuyển đổi sync_type, thay đổi khóa chính) yêu cầu xử lý cẩn thận để tránh làm hỏng dữ liệu đã đồng bộ.
playwright-test
posthog
Viết một bài kiểm tra playwright, đảm bảo nó chạy được và không bị lỗi không ổn định.
error-tracking-ruby
posthog
PostHog theo dõi lỗi cho Ruby
authoring-log-alerts
posthog
Tạo cảnh báo log hữu ích, ít nhiễu trên các dịch vụ trong một dự án PostHog. Sử dụng khi người dùng yêu cầu thiết lập cảnh báo cho log của họ, đề xuất các cảnh báo họ nên thêm,…
making-scenes-tab-aware
posthog
Guides converting PostHog frontend scenes to be tab aware for internal scene tabs. Use when adding or refactoring a `SceneExport` scene, fixing state leaking…
posthog-survey-creator
posthog
Tạo và cấu hình khảo sát trong PostHog thông qua hội thoại có hướng dẫn. Sử dụng kỹ năng này khi người dùng muốn tạo khảo sát, thu thập phản hồi người dùng, chạy…
authoring-scouts
posthog
Cách tạo, chỉnh sửa và điều chỉnh các scout PostHog Signals — các tác nhân theo lịch trình quét một dự án và viết báo cáo vào hộp thư đến Signals. Sử dụng khi người dùng…