Skill: harvest-tracker (version 0.1.0)

--- name: harvest-tracker description: Log and query time entries on Harvest for KodeSaaS projects. Use when the user asks to log time, check hours, view time entries, or track work on projects like ESC Pack, Ekho, Jedy, eRezo. metadata: {"openclaw": {"emoji": "⏱️", "requires": {"env": ["HARVEST_ACCESS_TOKEN", "HARVEST_ACCOUNT_ID"]}, "primaryEnv": "HARVEST_ACCESS_TOKEN"}} --- # Harvest Time Tracker Track time on Harvest for KodeSaaS projects via the Harvest API v2. ## Authentication Use these headers for all API calls: ``` Authorization: Bearer $HARVEST_ACCESS_TOKEN Harvest-Account-Id: $HARVEST_ACCOUNT_ID User-Agent: KodeSaaS Content-Type: application/json ``` Base URL: `https://api.harvestapp.com/api/v2` ## Project & Task Mapping All entries use **project_id: 45563188** (Freelance). | Alias | Task ID | Name | Rules | |---|---|---|---| | `esc-pack` | 24924725 | ESC Pack – Dev | Round up to nearest half-day (4h or 8h). **NEVER add notes** (exported to client). Exceptions: "Rattrapage" (Saturday) or "Intervention urgente" (billed x1.5) | | `ekho` | 25010585 | Echo - Dev | | | `jedy-formation` | 25773714 | Jedy Formation | Add course name in notes | | `jedy-prepa` | 25773713 | Jedy Préparation / Corrections | | | `erezo` | 25156409 | Projets Side - eRezo | | | `mnicole-dev` | 25156410 | Projets Side - mnicole.dev | | ## Shortcuts | Input | Hours | |---|---| | `0.5j` or `demi` | 4h (half day) | | `1j` or `jour` | 8h (full day) | | `hier` | Yesterday's date | | `lundi`...`vendredi` | Last occurrence of that weekday | ## Commands ### Log time When the user says "log X hours on Y" or "ajoute Xh sur Y": ```bash curl -s -X POST "https://api.harvestapp.com/api/v2/time_entries" \ -H "Authorization: Bearer $HARVEST_ACCESS_TOKEN" \ -H "Harvest-Account-Id: $HARVEST_ACCOUNT_ID" \ -H "User-Agent: KodeSaaS" \ -H "Content-Type: application/json" \ -d '{ "project_id": 45563188, "task_id": <task_id>, "spent_date": "<YYYY-MM-DD>", "hours": <hours>, "notes": "<notes or empty>" }' ``` **ESC Pack rounding rule**: Always round up to nearest half-day. - 1-4h → 4h - 5-8h → 8h **ESC Pack notes rule**: NEVER include notes. Only exceptions: - Saturday work → `"Rattrapage"` - Urgent intervention → `"Intervention urgente"` ### Query time entries for a period ```bash curl -s "https://api.harvestapp.com/api/v2/time_entries?project_id=45563188&from=<YYYY-MM-DD>&to=<YYYY-MM-DD>" \ -H "Authorization: Bearer $HARVEST_ACCESS_TOKEN" \ -H "Harvest-Account-Id: $HARVEST_ACCOUNT_ID" \ -H "User-Agent: KodeSaaS" ``` ### Query by task Add `&task_id=<task_id>` to filter by project. ### Get monthly summary Query all entries for the month and sum hours by task. Present as: ``` ESC Pack: Xh (X.Xj / 15j) Jedy Formation: Xh Ekho: Xh ... Total: Xh ``` ### Delete a time entry ```bash curl -s -X DELETE "https://api.harvestapp.com/api/v2/time_entries/<entry_id>" \ -H "Authorization: Bearer $HARVEST_ACCESS_TOKEN" \ -H "Harvest-Account-Id: $HARVEST_ACCOUNT_ID" \ -H "User-Agent: KodeSaaS" ``` ## Response format After logging, confirm with: - Task name - Hours logged (and if rounded for ESC Pack, show original → rounded) - Date - Notes (if any) After querying, present a clean summary table. ## Examples - "Log 8h ESC Pack today" → POST 8h on task 24924725, date today, no notes - "Ajoute 1j ESC Pack hier" → POST 8h on task 24924725, date yesterday, no notes - "Log 6h Jedy formation, cours IOT RabbitMQ" → POST 6h on task 25773714, notes "cours IOT RabbitMQ" - "Combien j'ai fait pour ESC Pack ce mois-ci ?" → GET entries filtered by task 24924725, sum hours - "Résumé du mois de mars" → GET all entries for March, group by task, display table


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)