task-completion
$
npx mdskill add megalithic/dotfiles/task-completionProvides structured guidelines for summarizing completed work with proper format, context, and follow-up items.
- Helps ensure clear handoff after finishing non-trivial tasks like file creation or code changes.
- Integrates with Bash tools for task execution and management.
- Decides recommendations based on task complexity and need for review or educational insights.
- Presents results through a formatted summary with opening statements, insights, and structured change details.
SKILL.md
.github/skills/task-completionView on GitHub ↗
--- name: task-completion description: Guidelines for summarizing completed work with proper format, context, and follow-up items. Use when finishing tasks to ensure clear handoff. tools: Bash --- # 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.
More from megalithic/dotfiles
- brave-searchWeb search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
- cli-toolsModern CLI tool usage (fd, rg) for fast file and content searching. Critical for Nix store searches and large codebases. Use when searching files or content, especially in /nix/store.
- hsComprehensive guide for Hammerspoon development in this dotfiles repo. Covers config patterns, debugging decision trees, API reference, performance monitoring, and troubleshooting.
- image-handlingImage handling for Claude API constraints (5MB max, 8000px max dimension). Use when working with images, screenshots, or MCP browser tools.
- jjJujutsu (jj) version control workflow, commands, and best practices. Use when working with version control in jj-enabled repos. Covers commits, bookmarks, workspaces, and safe push patterns.
- nixExpert help with Nix, nix-darwin, home-manager, flakes, and nixpkgs. Use for dotfiles configuration, package management, module development, hash fetching, debugging evaluation errors, and understanding Nix idioms and patterns.
- notesExpert help with the meganote system - cross-tool note capture, daily notes, and obsidian.nvim integration. Covers Hammerspoon, Shade, nvim, and the full capture → daily note linking pipeline.
- nvimComprehensive guide for Neovim configuration in this dotfiles repo. Covers plugin management, LSP debugging, treesitter, keymaps, performance, and troubleshooting decision trees.
- previewDisplay code, diffs, images, and other content in a tmux pane or popup. Auto-detects nvim/megaterm for floating popups.
- shadeExpert help with Shade - the native Swift note capture app. Use for debugging Shade issues, understanding IPC protocols, implementing Hammerspoon integration, nvim RPC, context gathering, and meganote workflows.