Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

fetch-zulip-messages: Help Claude actually use the skill.

Tim Abbott1a56a9fef318
diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md
index 32482a2857d..23be88655b1 100644
--- a/.claude/CLAUDE.md
+++ b/.claude/CLAUDE.md
@@ -375,6 +375,13 @@ tools/ # Development and testing scripts
docs/ # ReadTheDocs documentation source
```
+## Zulip Chat Links
+
+When you encounter a Zulip narrow URL (e.g., from `chat.zulip.org` in a
+GitHub issue, PR, or user message), use the `/fetch-zulip-messages` skill
+to read the conversation. Do not use `WebFetch` — it cannot access Zulip
+message content.
+
## Common Commands
```bash
diff --git a/.claude/skills/fetch-zulip-messages/fetch-zulip-web-public-messages b/.claude/skills/fetch-zulip-messages/fetch-zulip-web-public-messages
index 720ee445140..d4d1abc920b 100755
--- a/.claude/skills/fetch-zulip-messages/fetch-zulip-web-public-messages
+++ b/.claude/skills/fetch-zulip-messages/fetch-zulip-web-public-messages
@@ -40,15 +40,15 @@ def parse_zulip_url(url: str) -> tuple[str, int, str, str | None]:
server_url = f"{parsed.scheme}://{parsed.netloc}"
fragment = parsed.fragment
- # Parse the narrow fragment: narrow/channel/ID-slug/topic/encoded-topic[/with/ID]
+ # Parse the narrow fragment: narrow/channel/ID-slug/topic/encoded-topic[/with|near/ID]
match = re.match(
- r"^narrow/(?:channel|stream)/(\d+)-([^/]*)/topic/([^/]+)(?:/with/(\d+))?$",
+ r"^narrow/(?:channel|stream)/(\d+)-([^/]*)/topic/([^/]+)(?:/(?:with|near)/(\d+))?$",
fragment,
)
if not match:
print(f"Error: Could not parse Zulip narrow URL: {url}", file=sys.stderr)
print(
- "Expected format: https://HOSTNAME/#narrow/channel/ID-name/topic/TOPIC[/with/MSG_ID]",
+ "Expected format: https://HOSTNAME/#narrow/channel/ID-name/topic/TOPIC[/with|near/MSG_ID]",
file=sys.stderr,
)
sys.exit(1)