runkids/skillshare/.skillshare/skills/skillshare-implement-feature/SKILL.md
skillshare-implement-feature
Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development, proper handler split conventions, oplog instrumentation, and dual-mode (global/project) patterns. If the request involves writing Go code and tests, use this skill — even if the user do
- Source repository stars
- 2,519
- Declared platforms
- 0
- Static risk flags
- 2
- Last source update
- 2026-08-03
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/runkids/skillshare --skill ".skillshare/skills/skillshare-implement-feature"Inspect the Agent Skill "skillshare-implement-feature" from https://github.com/runkids/skillshare/blob/04aea45ebd1ecf703d117e7c931f3ba2f2378301/.skillshare/skills/skillshare-implement-feature/SKILL.md at commit 04aea45ebd1ecf703d117e7c931f3ba2f2378301. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow
If $ARGUMENTS is a file path: 1. Read the spec file 2. Extract acceptance criteria and edge cases 3. Identify affected packages
Read the spec fileExtract acceptance criteria and edge casesIdentify affected packages - 02
Step 1: Understand Requirements
If $ARGUMENTS is a file path: 1. Read the spec file 2. Extract acceptance criteria and edge cases 3. Identify affected packages
Read the spec fileExtract acceptance criteria and edge casesIdentify affected packages - 03
Step 2: Identify Affected Files
List all files that will be created or modified:
List all files that will be created or modified: - 04
Step 3: Write Failing Tests First (RED)
Write integration tests using testutil.Sandbox:
Write integration tests using testutil.Sandbox:Verify tests fail: bash make test-int - 05
Step 4: Implement (GREEN)
Write minimal code to make tests pass:
Follow existing patterns in cmd/skillshare/ and internal/Use internal/ui for terminal output (colors, spinners, boxes)Add oplog instrumentation for mutating commands:
Permission review
Static risk signals and limitations
Reads files
The documentation asks the agent to read local files, directories, or repositories.
Read the spec fileRuns scripts
The documentation asks the agent to run terminal commands or scripts.
make test-intRuns scripts
The documentation asks the agent to run terminal commands or scripts.
go test ./tests/integration -run TestFeature_BasicCaseEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 83/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 2,519 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- runkids/skillshare
- Skill path
- .skillshare/skills/skillshare-implement-feature/SKILL.md
- Commit
- 04aea45ebd1ecf703d117e7c931f3ba2f2378301
- License
- MIT
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
Implement a feature following TDD workflow. $ARGUMENTS is a spec file path (e.g., specs/my-feature.md) or a plain-text feature description.
Scope: This skill writes Go code and tests. It does NOT update website docs (use update-docs after) or CHANGELOG (use changelog after).
Workflow
Step 1: Understand Requirements
If $ARGUMENTS is a file path:
- Read the spec file
- Extract acceptance criteria and edge cases
- Identify affected packages
If $ARGUMENTS is a description:
- Search existing code for related functionality
- Identify the right package to extend
- Confirm scope with user before proceeding
Step 2: Identify Affected Files
List all files that will be created or modified:
# Typical pattern for a new command
cmd/skillshare/<command>.go # Command handler
cmd/skillshare/<command>_project.go # Project-mode handler (if dual-mode)
internal/<package>/<feature>.go # Core logic
tests/integration/<command>_test.go # Integration test
Display the file list and continue. If scope is unclear, ask the user.
Step 3: Write Failing Tests First (RED)
Write integration tests using testutil.Sandbox:
func TestFeature_BasicCase(t *testing.T) {
sb := testutil.NewSandbox(t)
defer sb.Cleanup()
// Setup
sb.CreateSkill("test-skill", map[string]string{
"SKILL.md": "---\nname: test-skill\n---\n# Content",
})
// Act
result := sb.RunCLI("command", "args...")
// Assert
result.AssertSuccess()
result.AssertOutputContains("expected output")
}
Verify tests fail:
make test-int
# or run specific test:
go test ./tests/integration -run TestFeature_BasicCase
Step 4: Implement (GREEN)
Write minimal code to make tests pass:
- Follow existing patterns in
cmd/skillshare/andinternal/ - Use
internal/uifor terminal output (colors, spinners, boxes) - Add oplog instrumentation for mutating commands:
start := time.Now() // ... do work ... e := oplog.NewEntry("command-name", statusFromErr(err), time.Since(start)) oplog.Write(configPath, oplog.OpsFile, e) - Register command in
main.gocommands map if new command
Verify tests pass:
make test-int
Step 5: Refactor and Verify
- Clean up code while keeping tests green
- Run full quality check:
make check # fmt-check + lint + test - Fix any formatting or lint issues
Project Patterns Reference
These patterns appear throughout the codebase. Follow them when implementing new features.
Handler Split Convention
Large commands are split by concern rather than kept in a single file. When a command handler grows beyond ~300 lines, split it:
| Suffix | Purpose | Example |
|---|---|---|
<cmd>.go | Flag parsing + mode routing (dispatch) | install.go |
_handlers.go | Core handler logic | install_handlers.go |
_render.go / _audit_render.go | Output rendering | audit_render.go |
_prompt.go / _prompt_tui.go | Decision/prompt logic | install_prompt.go |
_tui.go | Full-screen TUI (bubbletea) | list_tui.go |
_batch.go | Batch operation orchestration | update_batch.go |
_resolve.go | Target/skill resolution | update_resolve.go |
_context.go | Mode-specific context struct | install_context.go |
_format.go | Output formatting helpers | log_format.go |
Principle: dispatch file does ONLY flag parsing + mode routing. Logic goes in sub-files.
Dual-Mode Command Pattern
Most commands support both global (-g) and project (-p) mode:
func handleMyCommand(args []string) error {
mode, rest, err := parseModeArgs(args)
if err != nil { return err }
switch mode {
case modeProject:
return handleMyCommandProject(rest)
default:
return handleMyCommandGlobal(rest)
}
}
Create <cmd>_project.go for project-mode handler. Use parseModeArgs() from mode.go.
TUI Components (bubbletea)
All interactive prompts use bubbletea (not survey). Key components:
checklist_tui.go— shared checklist/radio pickerlist_tui.go— filterable list with detail panelsearch_tui.go— multi-select checkbox list
Color palette: cyan Color("6"), gray Color("8"), yellow #D4D93C.
Dispatch order: JSON output → TUI (if TTY + items + !--no-tui) → empty check → plain text.
Web API Endpoint
If the feature needs a Web UI endpoint, add internal/server/handler_<name>.go:
func (s *Server) handle<Name>(w http.ResponseWriter, r *http.Request) {
// ...
writeJSON(w, result) // 200 OK with JSON
// writeError(w, 400, msg) // for errors
}
Register in server.go route setup. Branch on s.IsProjectMode() for mode-specific behavior.
Oplog Instrumentation
All mutating commands log to operations.log (JSONL):
start := time.Now()
// ... do work ...
e := oplog.NewEntry("command-name", statusFromErr(err), time.Since(start))
e.Args = map[string]any{"key": value}
oplog.Write(configPath, oplog.OpsFile, e)
Security scans write to oplog.AuditFile instead.
Step 6: E2E Runbook (Major Features Only)
If the feature meets any of these criteria, generate an E2E runbook:
- New command or subcommand
- Changes to install/uninstall/sync flow
- Security-related (audit, hash verification, rollback)
- Multi-step user workflow (init → install → sync → verify)
- Edge cases that integration tests alone can't cover (Docker, network, file permissions)
Generate ai_docs/tests/<slug>_runbook.md following the existing convention:
# CLI E2E Runbook: <Title>
<One-line summary of what this validates.>
**Origin**: <version> — <why this runbook exists>
## Scope
- <bullet list of behaviors being validated>
## Environment
Run inside devcontainer with `ssenv` isolation.
## Steps
### 1. Setup: <description>
\```bash
<commands>
\```
**Expected**: <what should happen>
### 2. <Action>: <description>
...
## Pass Criteria
- All steps marked PASS
- <additional criteria>
Key conventions:
- YAML-free, pure Markdown
- Each step has
bashblock +Expectedblock ss=skillshare,~= ssenv-isolated HOME- Runbook can be executed by the
cli-e2e-testskill
If the feature does not meet the criteria above, skip this step.
Step 7: Stage and Report
- List all created/modified files
- Confirm each acceptance criterion is met with test evidence
- Remind user to run
update-docsif the feature affects CLI flags or user-visible behavior
Rules
- Test-first — always write failing test before implementation
- Minimal code — only write what's needed to pass tests
- Follow patterns — match existing code style in each package
- 3-strike rule — if a test fails 3 times after fixes, stop and report what's blocking
- No docs — this skill writes code only; use
update-docsfor documentation - No changelog — use
changelogskill for release notes - Spec ambiguity — ask the user rather than guessing
Alternatives
Compare before choosing
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
migrate-vstest-to-mtp
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
dotnet/skills
maui-dependency-injection
Guidance for configuring dependency injection in .NET MAUI apps — service registration in MauiProgram.cs, lifetime selection (Singleton / Transient / Scoped), constructor injection, Shell navigation auto-resolution, platform-specific registrations, and testability patterns. USE FOR: "dependency injection", "DI setup", "AddSingleton", "AddTransient", "AddScoped", "service registration", "constructor injection", "IServiceProvider", "MauiProgram DI", "register services", "BindingContext injection".
davepoon/buildwithclaude
circleci-automation
Automate CircleCI tasks via Rube MCP (Composio): trigger pipelines, monitor workflows/jobs, retrieve artifacts and test metadata. Always search tools first for current schemas.