task-completion

Guidelines for summarizing completed work with proper format, context, and follow-up items. Use when finishing tasks to ensure clear handoff.

215 stars

Best use case

task-completion is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Guidelines for summarizing completed work with proper format, context, and follow-up items. Use when finishing tasks to ensure clear handoff.

Teams using task-completion should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/task-completion/SKILL.md --create-dirs "https://raw.githubusercontent.com/megalithic/dotfiles/main/docs/skills/task-completion/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/task-completion/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How task-completion Compares

Feature / Agenttask-completionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Guidelines for summarizing completed work with proper format, context, and follow-up items. Use when finishing tasks to ensure clear handoff.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Task Completion Summary Skill

Defines the format and requirements for task completion summaries in AI agent sessions.

## When to Use

Load this skill when completing any non-trivial task that involved:
- Creating or modifying files
- Making code changes
- Completing a multi-step implementation
- Finishing work that should be reviewed

## Summary Format

### 1. Opening Statement

Brief confirmation that the task is complete:

```
Done, my liege! [Brief description of what was accomplished].
```

### 2. Insight Block (Required for non-trivial tasks)

Provide 2-3 educational insights specific to the implementation:

```
`★ Insight ─────────────────────────────────────`
**[Pattern/Concept Name]**: [Explanation of why this approach was used, what problem it solves, or what makes it interesting]

**[Another Pattern]**: [Another insight specific to this codebase or implementation]
`─────────────────────────────────────────────────`
```

**Focus on:**
- Codebase-specific patterns and conventions
- Trade-offs and design decisions made
- Interesting technical details
- Why certain approaches were chosen over alternatives

**Avoid:**
- Generic programming concepts
- Obvious explanations
- Insights that apply to any codebase

### 3. Summary Section

Structured summary of changes:

```markdown
## Summary

**Created:**
- `path/to/file.ext` (~N lines) - Brief description

**Modified:**
- `path/to/file.ext` - What was changed

**Features/Fixes:**
- ✅ Feature or fix 1
- ✅ Feature or fix 2

**Usage:** (if applicable)
```bash
command-example arg1 arg2
```
```

### 4. Preview Diff (REQUIRED)

**CRITICAL**: At the end of every task completion, invoke `preview-ai diff` to show the changes in a split pane:

```bash
preview-ai diff
```

This ensures:
- User can visually review all changes
- Changes are shown excluding `.beads/**` noise
- Preview appears RIGHT next to the AI agent pane
- User can verify before committing

## Complete Example

```
Done, my liege! The authentication middleware is now implemented with JWT validation.

`★ Insight ─────────────────────────────────────`
**Middleware Ordering**: The auth middleware is registered early in the pipeline
(before route handlers) but after CORS and body parsing. This ensures credentials
are validated before any business logic runs while still allowing preflight requests.

**Token Refresh Pattern**: Using a sliding window refresh (refresh if <5min remaining)
rather than fixed expiry. This prevents the jarring UX of tokens expiring mid-session
while the user is actively working.
`─────────────────────────────────────────────────`

## Summary

**Created:**
- `lib/middleware/auth.ex` (~85 lines) - JWT validation middleware
- `lib/auth/token.ex` (~45 lines) - Token generation/validation helpers

**Modified:**
- `lib/router.ex` - Added auth middleware to protected routes

**Features:**
- ✅ JWT token validation with RS256
- ✅ Sliding window token refresh
- ✅ Proper error responses for expired/invalid tokens

**Usage:**
```elixir
# In router.ex
pipeline :authenticated do
  plug MyApp.Middleware.Auth
end
```

[Executes: preview-ai diff]
```

## Integration with Finish Command

When running `/finish`, `/end`, or `/done`:

1. Complete all pending work
2. Generate summary using this format
3. Run `preview-ai diff` to show changes
4. Proceed with beads sync and push workflow

## Pane Positioning

`preview-ai` ensures the diff preview opens:
- **RIGHT next to** the AI agent's pane (horizontal split)
- In the **same window** as the agent
- **Session-scoped** (won't affect other tmux sessions)
- Focus returns to the agent pane after opening

This works correctly even with multiple panes in the window.

Related Skills

task-pipeline

215
from megalithic/dotfiles

Structured workflow for research → plan → tickets → work. Use when starting or continuing a task with /task, /plan, or /tickets commands.

writing-clearly-and-concisely

215
from megalithic/dotfiles

Apply Strunk's timeless writing rules to ANY prose humans will read - documentation, commit messages, error messages, explanations, reports, or UI text. Makes your writing clearer, stronger, and more professional.

web-search

215
from megalithic/dotfiles

Web search using DuckDuckGo (free, unlimited). Falls back to pi-web-access extension for content extraction.

web-browser

215
from megalithic/dotfiles

Interact with web pages using agent-browser CLI. MUST run 'browser connect 9222' FIRST to use existing browser with authenticated sessions.

tmux

215
from megalithic/dotfiles

Remote control tmux sessions for interactive CLIs (python, gdb, etc.) by sending keystrokes and scraping pane output.

ticket-worker

215
from megalithic/dotfiles

Work on a single tk ticket end-to-end. Use when the user says 'work on ticket X' or when spawned by work-tickets.sh.

ticket-creator

215
from megalithic/dotfiles

Create and refine tickets for the tk ticket system. Use when the user says 'create tickets for X', 'refine ticket X', 'break this into tickets', 'seed tickets from plan', or anything about creating or refining tk tickets.

tell

215
from megalithic/dotfiles

Delegate tasks to other agents - pi sessions or external agents (claude, opencode, aider). Non-blocking with task tracking and completion notifications.

preview

215
from megalithic/dotfiles

Display code, diffs, images, and other content in a tmux pane or popup. Auto-detects nvim/megaterm for floating popups.

mcpctl

215
from megalithic/dotfiles

Manage MCP server configurations — add, remove, list, inspect, troubleshoot. Use when asked to "add mcp server", "remove mcp", "list mcp servers", "mcp status", "configure mcp", "troubleshoot mcp", or any MCP server management task.

handoff

215
from megalithic/dotfiles

Save session state for later pickup. Use /handoff when context is degrading, /pickup to resume in a new session.

github

215
from megalithic/dotfiles

Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.