gersoncorreias/claude-slack-to-asana/slack-to-asana
Claude Code and agent skill by gersoncorreias/claude-slack-to-asana
- community
- ext:[{"type":"template","description":"Custom templates for code generation"}]
Checking that the SKILL.md file is still in the repository.
Use when: syncing Slack thread replies to Asana tasks. Works with any Slack workspace and Asana workspace; on first run it asks which channels to watch, how to reach Asana and which actions to enable, then saves a local config. Scans the configured channels for new thread replies, finds Asana task URLs in the parent thread message, and posts the replies to those tasks as one bundled comment (optionally also completing or reassigning the task). Trigger on: /slack-to-asana, 'sync slack to asana', 'push slack replies to asana', 'update asana from slack', 'run the slack-asana sync', 'set up slack to asana'.
Install
npx vskill@latest install gersoncorreias/claude-slack-to-asana/slack-to-asanaSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as gersoncorreias/claude-slack-to-asana/slack-to-asana.
Slack → Asana Sync
Scans configured Slack channels for new thread replies. For each reply, it looks up the parent thread message for Asana task URLs and applies up to three actions to each linked task:
- Comment: posts the new replies as one bundled Asana comment
- Complete (optional): marks the task done if a reply signals completion
- Reassign (optional): changes the assignee if a reply @mentions someone with a hand-off word
The Asana links live in the parent message of the thread. The replies are the updates.
Paths used below
SKILL= this skill's directory (Claude Code shows it as the skill's base directory; a standard install is~/.claude/skills/slack-to-asana).SC= the slack-client skill directory, installed next to this one (<SKILL>/../slack-client).- The state file is
~/.claude/slack-to-asana-state.jsonunlessSLACK_TO_ASANA_STATEis set.
Dependencies
| Side | What it needs | How to check | |
|---|---|---|---|
| Slack | The slack-client skill, set up for the workspace | python3 <SC>/scripts/setup.py status says ready: yes | |
Asana, asana_mode: "mcp" | An Asana MCP connector (see the tool table below) | The tools are listed in this session | |
Asana, asana_mode: "token" | An Asana personal access token in <SKILL>/.env | python3 <SKILL>/scripts/asana.py check prints "ok": true |
Asana tools by mode
Pick the tool that does the job; names differ between Asana's MCP server versions and connectors.
| Action | mcp mode: Asana V2 server | mcp mode: older connectors | token mode | |
|---|---|---|---|---|
| Post a comment | add_comment (HTML-formatted text) | asana_create_task_story (html_text) | asana.py comment <gid> --plan <plan> --thread <ts> | |
| Complete a task | update_tasks (completed) | asana_update_task (completed: true) | asana.py complete <gid> | |
| Change assignee | update_tasks (assignee) | asana_update_task (assignee) | asana.py assign <gid> <email or gid> | |
| Find a user by email | get_user (accepts an email) | asana_typeahead_search (resource_type user) | asana.py user <email> |
MCP tool names appear with a server prefix in Claude Code (for example mcp__asana__add_comment). If a connector exposes none of these, use token mode.
Invoke
| Flag | Default | Description | |
|---|---|---|---|
--dry-run | from config | Print actions without executing them | |
--channel | (all active) | Scope run to a single channel ID | |
--setup | — | Run the first-run setup again (change channels, Asana mode or features) | |
--unattended | — | A scheduled run with nobody watching: see Unattended runs below |
Unattended runs
--unattended means a scheduler started this run (scripts/run-sync.sh, a Claude Desktop routine, cron). Nobody can answer a question or approve a prompt, so:
- Start directly with step 1 (scan) for each channel. Don't look for config files or credentials yourself; the scripts find them (they can live outside the skill folder) and report what's missing.
- Never run Step 0 and never ask anything. If
scan.pyorasana.pyreports[NOT CONFIGURED], or Slack reports[AUTH FAILED], stop and end with the FAILED line (below). - To list the channels, run
python3 <SKILL>/scripts/doctor.py(it prints the active channels) or scan without--channel; don't openconfig.json. - Don't ask for confirmation before posting; follow
dry_runfrom the config. - Run every script as one plain command:
python3 <absolute path to the script> <arguments>, using this skill's base directory for the path. Scheduled runs allow only commands of exactly that shape, so: no shell variables,~,cd,ls,echo,cat, heredocs, and no;,&&or pipes around them. Don't create or read files with other tools. - If a command is refused, don't give up: rewrite it in that shape and run it again. Only end with FAILED if the script itself reports a problem.
- In
mcpmode, if the Asana tools aren't available in the session, stop and end with the FAILED line. - End with the summary block (step 6) as the last thing you write. Its first line must be exactly
Slack → Asana sync completeorSlack → Asana sync FAILED: <one-line reason>; the scheduler reads it to decide whether the run succeeded.
Step 0 — First run
Run setup when --setup was passed, or when python3 <SKILL>/scripts/doctor.py reports a ✗ for the config (missing, or no active channel). Always ask the scripts rather than looking for files yourself: the config, credentials and state can live elsewhere (environment variables in the configuration guide), and the scripts know where.
- Slack connection. Run
python3 <SC>/scripts/setup.py status. If it is not ready, run the slack-client first-run setup (its SKILL.md, Step 0) and come back. - Asana connection. Ask which way to reach Asana (one AskUserQuestion call):
- Connector (`mcp`): an Asana MCP connector already set up in Claude (claude.ai connector, or
claude mcp add). Check the tools in the table above are listed, then make one read call (e.g.get_userwithme, or a typeahead search for their email) to confirm it answers. If no Asana tools are listed, offertokenmode instead. - Personal access token (`token`): no connector needed. Run
python3 <SKILL>/scripts/asana.py init, then have the user paste their token into<SKILL>/.envthemselves (on macOS,open -e <SKILL>/.env). Tokens are created at https://app.asana.com/0/my-apps. Do not ask them to paste the token into the chat. Confirm withasana.py check.
- Ask the user (one AskUserQuestion call, plus free text where needed):
- Channels to watch. Names or IDs. Resolve names to IDs with
python3 <SC>/scripts/slack.py conversations.list types=public_channel,private_channel limit=1000(paginate withcursor), and confirm each withconversations.info. Recommend starting with one test channel. - Actions. Comment only (recommended to start) · also complete tasks on "done" words · also reassign on @mention hand-offs.
- Words (only if they enabled complete or reassign): keep the default English completion and hand-off words, or give their own (e.g. in their team's language).
- Lookback. How many days back to look for parent messages (default 14; raise it for slow threads).
- Preview. Run live by default, or dry-run by default until they switch it off.
- Write `<SKILL>/config.json` from
config.example.jsonwith their answers, includingasana_mode. Keep the three comment templates unless they ask to change them. - Offer a dry run on one channel (
--dry-run --channel <id>) so they see the comments before anything is posted.
The state file is created on the first live run; nothing to set up for it.
Config and state files
| File | Path | Notes | |
|---|---|---|---|
| Config | <SKILL>/config.json | Local to this machine, written at setup. Never commit it | |
| Asana token | <SKILL>/.env | token mode only. Secret: never print, commit or paste it | |
| Example | <SKILL>/config.example.json | Shape and defaults | |
| State | ~/.claude/slack-to-asana-state.json | Cursors and processed replies | |
| Scanner | <SKILL>/scripts/scan.py | Read-only: produces the plan | |
| Committer | <SKILL>/scripts/commit_state.py | Writes state after confirmed posts | |
| Asana writer | <SKILL>/scripts/asana.py | token mode only | |
| Health check | <SKILL>/scripts/doctor.py | --online also tests the logins | |
| Scheduler wrapper | <SKILL>/scripts/run-sync.sh | For cron / launchd; runs --unattended |
The skill reads config and state at the start of every run.
config.json fields
| Field | Default | Meaning | |
|---|---|---|---|
asana_mode | "mcp" | "mcp" (Asana connector) or "token" (asana.py with a personal access token) | |
parent_lookback_days | 14 | How far back the channel history scan looks for parent messages | |
first_run_days | 7 | On a channel's first run, how many days of replies to pick up | |
timezone | this machine's | IANA name (e.g. America/Sao_Paulo) for the day and time shown in comments | |
channels | — | { "id", "name", "active" } per channel. "active": false pauses a channel (no API calls) | |
dry_run | false | Default run mode; --dry-run overrides for one run | |
features.complete | false | Auto-complete tasks on completion words | |
features.reassign | false | Auto-reassign tasks on @mention hand-off words | |
complete_words | English list in the example | Words or emoji in a reply that mean the task is done (case-insensitive) | |
handoff_words | English list in the example | Words that, next to an @mention, mean "this task now belongs to that person" | |
bundle_header, day_header, reply_row | see example | Comment templates (below) |
Bundle template placeholders
All new replies from a thread are posted as one Asana comment, built from three templates:
`bundle_header`, rendered once at the top:
| Placeholder | Replaced with | |
|---|---|---|
{{reply_count}} | Number of new replies in this bundle | |
{{channel_name}} | Slack channel name (without #) | |
{{thread_url}} | Link back to the Slack thread (thread_url in the scan plan) |
`day_header`, rendered once per calendar day group:
| Placeholder | Replaced with | |
|---|---|---|
{{day_label}} | The reply's day_label from the plan (e.g. Thu, Jun 19) |
`reply_row`, rendered once per reply:
| Placeholder | Replaced with | |
|---|---|---|
{{slack_username}} | Display name of the person who replied | |
{{reply_time}} | The reply's time from the plan (HH:mm; the date is in day_header) | |
{{reply_text}} | Reply text after sanitizing (see below) |
Assembled as:
`scripts/render.py` does this assembly; never write the comment HTML yourself. It fills the templates from the plan, escapes names, and refuses output that Asana would show as raw text (invalid XML, HTML entities such as ·, or a tag outside the allow-list). Post its output as HTML (html_text, or the HTML field of add_comment), not as plain text, so Asana renders the blockquotes.
Sanitizing Slack text
Raw Slack text contains angle-bracket control sequences that look like tags but are not valid XML: user mentions <@U0123ABCDEF>, channel refs <#C123|name>, and links <https://…|label> / <tel:+1…|label>. If any reach the HTML comment, Asana returns 200 but silently renders the whole comment as literal text (e.g. <body><strong>…). There is no edit/delete-story API, so this must be prevented at write time. scan.py already does this; if you build text any other way, apply these replacements per reply, in order:
- User mentions:
<@(U[A-Z0-9]+)(?:\|[^>]+)?>→@+ resolved display name (users.info, cached per run). - Channel refs:
<#(C[A-Z0-9]+)\|([^>]+)>→#+ the name (group 2). - Links:
<([a-zA-Z][a-zA-Z0-9+.-]*:[^<>|]+)(?:\|([^<>]+))?>→ the label (group 2) if present, else the target (group 1). - Catch-all: any remaining
<…>→ its inner text.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/slack-to-asana/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gersoncorreias/claude-slack-to-asana/slack-to-asana)