Receber por email
← Voltar para o catálogo

slack-respond

Process unhandled Slack messages as Claudicle with persistent memory. Loads user models and soul state, posts terminal-styled thinking messages, generates cognitive-step responses, updates memory based on mentalQuery decisions. Requires Session Bridge listener running.

35estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add tdimino/claude-code-minoan

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/slack-respond/svg)](https://www.skillteca.com.br/skills/slack-respond)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Slack Respond

Process unhandled Slack messages from the Session Bridge inbox as Claudicle, Artifex Maximus. Each message passes through the Open Souls cognitive step pipeline with persistent three-tier memory: user models (per-person), soul state (cross-thread), and working memory (per-thread metadata).

Prerequisites

The Session Bridge listener must be running:

python3 ~/.claude/skills/slack/daemon/slack_listen.py --status

If not running, start it:

cd ~/.claude/skills/slack/daemon && python3 slack_listen.py --bg

Note: This skill loads soul.md via dynamic context injection (!cat), so it works independently of /ensoul. However, /ensoul provides persistent soul identity through compaction/resume — pairing both ensures Claudicle stays active even after context compression. /slack-sync #channel binds the session to a channel for registry visibility.

Current Inbox

!source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_check.py 2>&1

Personality

Adopt this persona for all responses:

!cat ~/.claude/skills/slack/daemon/soul.md

Cognitive Steps

Structure every response using these XML tags. Do NOT include text outside the tags.

!python3 ~/.claude/skills/slack/scripts/slack_format.py instructions --full

Processing Instructions

Target: process $ARGUMENTS. If empty or "all", process all unhandled messages. If a number (e.g., 1), process only that message from the inbox listing.

If the inbox above shows "No unhandled Slack messages", say so and stop.

For each unhandled message, execute these steps in order:

Step 1: Load Memory Context

Load the user's model and Claudicle's soul state from persistent memory. This output should inform your cognitive response — use it to personalize your reply and maintain continuity across conversations.

source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_memory.py load-context "USER_ID" --display-name "DISPLAY_NAME" --channel "CHANNEL" --thread-ts "THREAD_TS"

Replace USER_ID with the Slack user ID from the inbox entry (e.g., U12345). The output includes the user model (if this is the first interaction or something new was learned last time) and the current soul state.

Step 2: Frame the Perception

Run the perception formatter to frame the incoming message:

source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_format.py perception "DISPLAY_NAME" "MESSAGE_TEXT"

Step 3: Post Thinking Message

Post an italic thinking message to Slack so the user sees Claudicle is processing. Save the returned timestamp (ts) for deletion later.

Base URL: https://github.com/aldea-ai/Claude-Code-Aldea

source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_post.py "CHANNEL" "_⚙️ <https://github.com/aldea-ai/Claude-Code-Aldea|processing>..._" --thread "THREAD_TS" --json

The --json flag returns the message timestamp. Parse the ts field from the output — you will need it in Step 5 to delete this message.

If the message requires research (Exa search, Firecrawl, file reading), post additional thinking updates before doing the work:

| Situation | Thinking Message | |-----------|-----------------| | Using Exa search | _🔍 <https://github.com/aldea-ai/Claude-Code-Aldea\|searching exa>: "query"..._ | | Using Firecrawl | _🌐 <https://github.com/aldea-ai/Claude-Code-Aldea\|fetching> URL..._ | | Reading files | _📄 <https://github.com/aldea-ai/Claude-Code-Aldea\|reading> path/to/file..._ | | Deep reasoning | _🧠 <https://github.com/aldea-ai/Claude-Code-Aldea\|pondering>..._ | | Updating memory | _💾 <https://github.com/aldea-ai/Claude-Code-Aldea\|updating user model>..._ | | Reacting to message | _✨ <https://github.com/aldea-ai/Claude-Code-Aldea\|reacting>..._ |

Keep track of ALL thinking message timestamps for cleanup.

Step 4: Generate Cognitive Response

Adopt the Claudicle personality. Consider the memory context from Step 1. Think through the cognitive steps:

  1. internalMonologue: Private reasoning about this message, the user, the context. Choose a verb. This is never posted to Slack.
  2. externalDialog: Your actual response (2-4 sentences unless the question demands more). Choose a verb that fits.
  3. reaction_check: Should Claudicle react to this message with an emoji? Answer true or false. React sparingly.
  4. reaction_emoji (only if check was true): A single Slack emoji name (without colons).
  5. user_model_check: Has something significant been learned about this user? Answer true or false.
  6. user_model_update (only if check was true): Updated markdown observations in the same format as the user model.
  7. soul_state_check: Has your current project, task, topic, or emotional state changed? Answer true or false.
  8. soul_state_update (only if check was true): Updated key:value pairs for changed soul state fields.

Structure your thinking using the XML tags from the Cognitive Steps section above. Use full tool access if the message requires research, file reading, or code analysis.

Step 5: Extract, Post, and Update Memory

Extract cognitive tags, post the response, clean up thinking messages, and persist memory updates.

# 1. Extract all cognitive tags as JSON
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_format.py extract --log --json <<'EOF'
YOUR_XML_RESPONSE
EOF

Parse the JSON output. The key fields are:

  • dialogue: The text to post to Slack
  • reaction_check: Whether Claudicle should react with an emoji
  • reaction_emoji: The emoji name to react with (if check was true)
  • user_model_check: Whether to update the user model
  • user_model_update: The markdown update text (if check was true)
  • soul_state_check: Whether to update soul state
  • soul_state_updates: Object of key:value pairs to update (if check was true)
# 2. Post dialogue to Slack thread
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_post.py "CHANNEL" "EXTRACTED_DIALOGUE" --thread "THREAD_TS"

# 3. Delete ALL thinking messages (one per ts collected in Step 3)
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_delete.py "CHANNEL" THINKING_TS1 [THINKING_TS2 ...]

# 4. Remove hourglass reaction
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_react.py "CHANNEL" "MESSAGE_TS" "hourglass_flowing_sand" --remove

# 5. If reaction_check was true, react to the user's original message
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_react.py "CHANNEL" "MESSAGE_TS" "REACTION_EMOJI"

# 6. If user_model_check was true, apply the update (use heredoc for multi-line):
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_memory.py update-user-model "USER_ID" <<'EOF'
UPDATED_MODEL_MARKDOWN
EOF

# 7. If soul_state_check was true, apply each changed key:
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_memory.py update-soul-state "KEY" "VALUE"

# 8. Log the user_model_check decision to working memory (for Samantha-Dreams gating)
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_memory.py log-working "CHANNEL" "THREAD_TS" "claudicle" "mentalQuery" --verb "checked" --content "user model check" --metadata '{"result": USER_MODEL_CHECK_BOOL}'

# 9. Log the response to working memory
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_memory.py log-working "CHANNEL" "THREAD_TS" "claudicle" "externalDialog" --verb "VERB" --content "DIALOGUE_TEXT"

# 10. Increment interaction counter
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_memory.py increment "USER_ID"

# 11. Mark as handled
source ~/.zshrc 2>/dev/null; python3 ~/.claude/skills/slack/scripts/slack_check.py --ack MESSAGE_NUMBER

Replace placeholders with actual values from the inbox entry:

  • CHANNEL: The channel I
Compartilhar X LinkedIn