spark-recipe-label-organize — Claude Code skill: setup & guide
A workflow recipe for sorting email in Spark CLI. It helps agents attach project labels, remove wrong tags, and move messages into IMAP folders.
npx skills add readdle/spark-cli-skills --skill spark-recipe-label-organize -a claude-code
npx skills add readdle/spark-cli-skills --skill recipe-label-organize -a claude-codeWhat spark-recipe-label-organize does
This recipe guides agents through mailbox organization. First, it inspects folder hierarchies using spark folders to obtain qualified label identifiers. Next, it searches for target messages using spark search or date filters. It then calls spark action to run attachLabel, detachLabel, or moveToFolder.
The steps account for different email providers. For Gmail accounts, it favors attachLabel and detachLabel because labels do not displace messages from their current location. For IMAP accounts, it relies on moveToFolder to move emails physically. It also supports shared inbox formats like [email protected]:LabelName.
The recipe cannot run on its own. Without the use-spark base skill and a triage access level, sorting commands will fail.
What it helps with
- tag project-related emails with labels
- remove misapplied labels from message threads
- move misfiled messages to designated IMAP folders
- find untagged emails from specific clients
Example prompts for the agent
- Check the folder tree for [email protected] and find emails from the client
- Attach the label [email protected]:ProjectAlpha to message id_456
- Detach the wrong label from id_789 and move it to the Projects folder
How to install spark-recipe-label-organize
1Skills CLI (Vercel)
npx skills add readdle/spark-cli-skills --skill spark-recipe-label-organize -a claude-codenpx skills add readdle/spark-cli-skills --skill recipe-label-organize -a claude-code2Manually: put the files in place
~/.claude/skills/recipe-label-organize/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/recipe-label-organize/
1Skills CLI (Vercel)
npx skills add readdle/spark-cli-skills --skill recipe-label-organize -a codex2Manually: put the files in place
.agents/skills/recipe-label-organize/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add readdle/spark-cli-skills --skill recipe-label-organize -a cursor2Manually: put the files in place
.cursor/skills/recipe-label-organize/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install readdle/spark-cli-skills recipe-label-organize2Manually: put the files in place
.github/skills/recipe-label-organize/SKILL.md1Skills CLI (Vercel)
npx skills add readdle/spark-cli-skills --skill recipe-label-organize -a gemini-cli2Platform CLI
gemini skills install https://github.com/readdle/spark-cli-skills --path skills/recipe-label-organizeManually: put the files in place
.devin/skills/recipe-label-organize/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add readdle/spark-cli-skills --skill recipe-label-organize -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about spark-recipe-label-organize
How do I install spark-recipe-label-organize in Claude Code?
Run npx skills add readdle/spark-cli-skills --skill spark-recipe-label-organize -a claude-code.
What does spark-recipe-label-organize do?
It provides a step-by-step workflow for Spark CLI to check folders, search messages, apply or remove labels, and relocate emails.
What are the prerequisites for this skill?
It requires the use-spark base skill installed and an access level set to triage.
Source text
SKILL.md · MIT
---
name: spark-recipe-label-organize
description: >-
Organize emails with labels and folders: attach labels, detach wrong ones,
and move misfiled emails.
metadata:
version: 1.0.0
requires:
skills:
- use-spark
accessLevel: triage
---
# Recipe: Label & Folder Organize
Organize emails using labels and folders. Attach project labels, detach incorrect ones, and move misfiled emails to the right location.
**Prerequisite:** Read the `use-spark` base skill for command reference and filter syntax.
**Access level required:** triage.
## Steps
### Step 1: Review current folder and label structure
```bash
spark folders
```
For a specific account:
```bash
spark folders [email protected]
```
Note the existing labels and their message counts. Identify labels that are empty or no longer relevant.
### Step 2: Identify emails that need labeling
Search for project-related or topic-related emails that should be labeled:
```bash
spark search "project name"
spark emails --filter "from:[email protected] newer_than:30d"
```
### Step 3: Attach labels
Add a label to an email without removing it from its current location:
```bash
spark action attachLabel <id> --folder "[email protected]:ProjectAlpha"
```
Label multiple emails in a batch:
```bash
spark action attachLabel <id1> --folder "[email protected]:ProjectAlpha"
spark action attachLabel <id2> --folder "[email protected]:ProjectAlpha"
```
### Step 4: Detach incorrect labels
Remove a label that was applied incorrectly:
```bash
spark action detachLabel <id> --folder "[email protected]:WrongLabel"
```
### Step 5: Move misfiled emails
Move emails to the correct folder:
```bash
spark action moveToFolder <id> --folder "[email protected]:Projects"
```
### Step 6: Verify
Browse the organized label to confirm the right emails are there:
```bash
spark emails [email protected]:ProjectAlpha
```
## Tips
- Use `folders` to discover the exact qualified names for labels (e.g., `[email protected]:MyLabel`).
- `attachLabel` adds a label without moving the email - the email stays in its current folder too. This is how Gmail labels work.
- `detachLabel` removes a label without moving the email elsewhere.
- `moveToFolder` physically moves the email to a different folder - use this for IMAP-style organization.
- For Gmail accounts, prefer `attachLabel`/`detachLabel` over `moveToFolder` since Gmail uses labels rather than folders.
- Shared inbox labels use the format `[email protected]:LabelName` or `"Team Name:LabelName"`.
- Combine with `recipe-meeting-prep` or project tracking workflows to label threads as part of a larger process.
- Run this recipe periodically to keep project labels current as new related emails arrive.
© readdle · MIT · readdle/spark-cli-skills