task-context
Skill4 starsChanged 13 days agoMITView on GitHub
Turns an Intervals task into ready-to-work context. Fetches the task and its notes, decodes HTML entities, builds a compact brief, classifies the task type, creates the git branch, and routes to the right skill/agent. Handles time logging on finish with 15-minute banding. Intervals is the single source of truth; Google Workspace (via the `gws` CLI) is an opt-in enricher only — never searched automatically. Use this skill for the /task command, or whenever the user references an Intervals task by its numeric ID and wants to start or close work on it.
In this repository37 other files it gives its agents.
- blast-radiusSkill
- elementflow-kbSkill
- gitlab-changelog-releaseSkill
- gitlab-ci-quality-gatesSkill
- gitlab-project-bootstrapSkill
- gitlab-security-setupSkill
- gitlab-wiki-bootstrapSkill
- lando-checkSkill
- lando-img-placeholderSkill
- lando-mail-smtpSkill
- lando-setupSkill
- mallard-releaseSkill
- mr-flowSkill
- no-commentsSkill
- paginated-report-pdfSkill
- panda-kbSkill
- ploi-prestashop-deploySkill
- prestashop-kbSkill
- ps-consoleSkill
- ps-css-buildSkill
- ps-demo-userSkill
- ps-email-previewSkill
- ps-image-regenSkill
- ps-invoice-previewSkill
- ps-new-projectSkill
- ps-one-page-checkoutSkill
- ps-project-docSkill
- ps-security-auditSkill
- ps-storefront-polishSkill
- ps-theme-cacheSkill
- ps-translateSkill
- ps-view-transitionsSkill
- ps-watchSkill
- reflectSkill
- show-me-your-workSkill
- skill-authorSkill
- verify-ps-projectSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
All Intervals calls use the intervals MCP tools.
- Very specific: line 35
If summary is empty AND notes are thin (< ~200 chars / no actionable detail), mark the brief:
- Distinctive: line 41
Do not search anything here.
- Distinctive: line 45
Never triggered automatically.
- Distinctive: line 57
Only the parsed summary enters context — never paste raw email bodies.
- Very specific: line 73
If --type <type> was passed, use it instead.
- Distinctive: line 102
Create/switch in the current repo (cwd).
- Distinctive: line 103
Never delete remote branches (team policy).
- Distinctive: line 121
Ask the user for the real time (accept the suggestion or a typed value).
- Distinctive: line 122
Ask billable? (y/n) — every time, no default.
- Distinctive: line 126
Never write a time entry without the user's confirmed number.
- Very specific: line 132
Check the cache ~/.config/mallard/worktypes.json for this task's projectid.
- Very specific: line 133
If absent, call get_time_entries(taskId=<localid>, datebegin=..., dateend=...) (a wide range, e.g.
- Distinctive: line 135
If no prior entry exists in the project, ask the user for the worktype id once, then cache it.
- Distinctive: line 142
Never auto-enrich. Never auto-log time.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
task-context — Intervals task → ready-to-work
Single source of truth = Intervals. Google Workspace = opt-in enricher only. Never auto-search Gmail/Drive (wastes tokens on context that may not exist).
All Intervals calls use the intervals MCP tools. Gmail/Drive use the gws CLI via the helper script.
Flow A — start a task: /task <localid> [flags]
1. Fetch
get_task(<localid>)→ core fields.get_task_notes(taskId=<localid>)→ comments (real detail usually lives here).- Decode HTML entities in
title,summary, and note bodies — both named (ó→ó,&→&) and numeric ( →newline,'→'). Notes commonly use for paragraph breaks.
2. Assess completeness (label only — no search)
If summary is empty AND notes are thin (< ~200 chars / no actionable detail), mark the brief:
⚠ thin — no actionable detail in Intervals. Run /task <localid> --enrich to pull Gmail/Drive context.Do not search anything here. Enrich is explicit only.
3. Enrich — ONLY if --enrich was passed
Never triggered automatically. When invoked:
~/.claude/skills/task-context/scripts/gmail_search.sh "<client>" "<pm-owner>" "<keywords>"<client>= taskclientfield;<pm-owner>= taskownersfield (the PM);<keywords>= 2–4 salient words from the title.- The script prints compact JSON (from / date / subject / snippet). Fold the relevant lines into the brief with a one-line source note.
- Optional Drive lookup for assets:
gws drive files list --params '{"q":"name contains '\''<client>'\''","pageSize":10,"fields":"files(id,name,mimeType,webViewLink)"}' --format json - Only the parsed summary enters context — never paste raw email bodies.
4. Classify type
From module + title/notes keywords, assign one type and its route:
| Type | Signals | Route |
translation | i18n, "traducir", English strings | ps-translate skill (near-auto) |
image | "imágenes", white zones, thumbnails, regen | ps-image-regen skill (near-auto) |
layout | Disseny/design module, CSS, header/footer, product page | layout-builder agent (semi-auto) |
bug | error, "no funciona", stacktrace | human-led, agent assists |
security | CVE, module advisory, scan | ps-security-audit skill |
content | text/CMS edits | semi-auto |
unknown | fallthrough | present brief, ask |
If --type <type> was passed, use it instead.
5. Brief — print to chat AND save to engram
Print this, then mem_save it with topic_key: task/<localid>/brief, project: cinetic, capture_prompt: false. No repo file.
TASK <localid> · [<status> · P<priority> · <severity>]
<decoded title>
Client: <client> Module: <module> PM: <owners>
Time: <actual>h logged / est <estimate> Due: <datedue or —>
WHAT'S ASKED
<decoded summary + distilled notes | ⚠ thin — ... (see step 2)>
CONTEXT (enriched) ← only if --enrich ran
<gmail/drive snippets + links>
AMBIGUITIES / TO CHASE
- <missing info to ask the PM>
TYPE: <type> → route: <skill/agent>
BRANCH: <localid> (<created|switched|skipped>)
NEXT: <proposed first steps>6. Git branch (unless --no-branch)
- Branch name =
<localid>. If it exists or is stale →<localid>-<slug>(slug = kebab of a few title words). - Create/switch in the current repo (cwd). No cross-repo logic.
- Never delete remote branches (team policy). Local hygiene only:
git fetch -p.
7. Route
Name the matching skill/agent (step 4) and offer to hand off. For deterministic types (translation, image, security) you may proceed with the skill directly; for layout/bug draft and let the user review.
Flow B — finish a task: /task done <localid>
Time only. No git. Never commit or push.
Time model — 15-minute banding, human-confirmed
Billing is booked in 15-minute bands, minimum 15 min (0.25h increments). Never auto-log from elapsed wall-clock — the session may have been paused, so elapsed is unreliable.
- Optionally show a naive elapsed figure labeled:
hint (unreliable, includes idle): ~Xh. - Round the hint up to the nearest 0.25h and present as a suggestion.
- Ask the user for the real time (accept the suggestion or a typed value).
- Ask billable? (y/n) — every time, no default.
- Resolve the worktype id (see below), then:
add_time_entry(taskId=<localid>, worktypeid=<id>, date=<today YYYY-MM-DD>, time=<confirmed decimal hours>, billable=<bool>).
Never write a time entry without the user's confirmed number.
Worktype resolution — always "Varis"/"Varios"
The Intervals API cannot list worktypes for this user group (intervals://worktypes → 403), and worktype ids are project-scoped. Resolve dynamically:
- Check the cache
~/.config/mallard/worktypes.jsonfor this task'sprojectid. - If absent, call
get_time_entries(taskId=<localid>, datebegin=..., dateend=...)(a wide range, e.g. the last year) and find an entry whoseworktypename isVarisorVarios; reuse itsworktypeid. Cache it under theprojectid. - Seed value:
256467for projectNEVEN - Tiendas Aka(projectid1380816). - If no prior entry exists in the project, ask the user for the worktype id once, then cache it.
Hard rules
- Intervals is the only source of truth. Slack/Trello/Gmail are not integrated; Gmail/Drive are opt-in enrichers via
gwsonly. - Never auto-enrich. Never auto-log time. Never touch remote branches.
- English-only content (mallard is public). No company names in code/paths.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

