gersoncorreias/claude-slack-to-asana/slack-to-asana

Claude Code and agent skill by gersoncorreias/claude-slack-to-asana

Trust tier 3
  • community
  • ext:[{"type":"template","description":"Custom templates for code generation"}]
Source check pending

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-asana

Semi-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:

  1. Comment: posts the new replies as one bundled Asana comment
  2. Complete (optional): marks the task done if a reply signals completion
  3. 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.json unless SLACK_TO_ASANA_STATE is set.

Dependencies

SideWhat it needsHow to check
SlackThe slack-client skill, set up for the workspacepython3 <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>/.envpython3 <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.

Actionmcp mode: Asana V2 servermcp mode: older connectorstoken mode
Post a commentadd_comment (HTML-formatted text)asana_create_task_story (html_text)asana.py comment <gid> --plan <plan> --thread <ts>
Complete a taskupdate_tasks (completed)asana_update_task (completed: true)asana.py complete <gid>
Change assigneeupdate_tasks (assignee)asana_update_task (assignee)asana.py assign <gid> <email or gid>
Find a user by emailget_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

/slack-to-asana [--dry-run] [--channel <channel_id>] [--setup] [--unattended]
FlagDefaultDescription
--dry-runfrom configPrint 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.py or asana.py reports [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 open config.json.
  • Don't ask for confirmation before posting; follow dry_run from 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 mcp mode, 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 complete or Slack → 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.

  1. 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.
  2. 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_user with me, or a typeahead search for their email) to confirm it answers. If no Asana tools are listed, offer token mode instead.
  • Personal access token (`token`): no connector needed. Run python3 <SKILL>/scripts/asana.py init, then have the user paste their token into <SKILL>/.env themselves (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 with asana.py check.
  1. 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 with cursor), and confirm each with conversations.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.
  1. Write `<SKILL>/config.json` from config.example.json with their answers, including asana_mode. Keep the three comment templates unless they ask to change them.
  2. 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

FilePathNotes
Config<SKILL>/config.jsonLocal to this machine, written at setup. Never commit it
Asana token<SKILL>/.envtoken mode only. Secret: never print, commit or paste it
Example<SKILL>/config.example.jsonShape and defaults
State~/.claude/slack-to-asana-state.jsonCursors and processed replies
Scanner<SKILL>/scripts/scan.pyRead-only: produces the plan
Committer<SKILL>/scripts/commit_state.pyWrites state after confirmed posts
Asana writer<SKILL>/scripts/asana.pytoken mode only
Health check<SKILL>/scripts/doctor.py--online also tests the logins
Scheduler wrapper<SKILL>/scripts/run-sync.shFor cron / launchd; runs --unattended

The skill reads config and state at the start of every run.

config.json fields
FieldDefaultMeaning
asana_mode"mcp""mcp" (Asana connector) or "token" (asana.py with a personal access token)
parent_lookback_days14How far back the channel history scan looks for parent messages
first_run_days7On a channel's first run, how many days of replies to pick up
timezonethis machine'sIANA 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_runfalseDefault run mode; --dry-run overrides for one run
features.completefalseAuto-complete tasks on completion words
features.reassignfalseAuto-reassign tasks on @mention hand-off words
complete_wordsEnglish list in the exampleWords or emoji in a reply that mean the task is done (case-insensitive)
handoff_wordsEnglish list in the exampleWords that, next to an @mention, mean "this task now belongs to that person"
bundle_header, day_header, reply_rowsee exampleComment 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:

PlaceholderReplaced 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:

PlaceholderReplaced with
{{day_label}}The reply's day_label from the plan (e.g. Thu, Jun 19)

`reply_row`, rendered once per reply:

PlaceholderReplaced 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:

<body>
{bundle_header}
for each day group (chronological):
{day_header}
{reply_row × replies on that day}
</body>

`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 &middot;, 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. &lt;body&gt;&lt;strong&gt;…). 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:

  1. User mentions: <@(U[A-Z0-9]+)(?:\|[^>]+)?> → @ + resolved display name (users.info, cached per run).
  2. Channel refs: <#(C[A-Z0-9]+)\|([^>]+)> → # + the name (group 2).
  3. Links: <([a-zA-Z][a-zA-Z0-9+.-]*:[^<>|]+)(?:\|([^<>]+))?> → the label (group 2) if present, else the target (group 1).
  4. 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gersoncorreias/claude-slack-to-asana/slack-to-asana/badge)](https://verified-skill.com/skills/gersoncorreias/claude-slack-to-asana/slack-to-asana)

Something wrong with this skill or its page? Tell us.