Skip to content

Commit 10f85b7

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 25383c8 + c0bec1c commit 10f85b7

895 files changed

Lines changed: 40890 additions & 34662 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/commands/create-pr.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

.cursor/commands/deploy-demo.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

.cursor/commands/get-checks-status.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.cursor/commands/prepare-release.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

.cursor/hooks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"hooks": {
44
"afterFileEdit": [
55
{
6-
"command": "yarn eslint --fix ${file}",
6+
"command": "pnpm eslint --fix ${file}",
77
"filter": {
88
"include": ["**/*.{ts,tsx,js,jsx}"]
99
}

.cursor/mcp.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
{
2-
"mcpServers": {
3-
"chakra-ui": {
4-
"command": "npx",
5-
"args": ["-y", "@chakra-ui/react-mcp"]
6-
}
2+
"mcpServers": {
3+
"chakra-ui": {
4+
"command": "npx",
5+
"args": [
6+
"-y",
7+
"@chakra-ui/react-mcp"
8+
]
9+
},
10+
"next-devtools": {
11+
"command": "npx",
12+
"args": [
13+
"-y",
14+
"next-devtools-mcp@latest"
15+
]
716
}
8-
}
17+
}
18+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: check-github-cli
3+
description: Ensure GitHub CLI (gh) is installed and authenticated before running gh commands; guide the user to configure it if not
4+
---
5+
# Check GitHub CLI Availability
6+
7+
Use this skill whenever a workflow or command requires the GitHub CLI (`gh`). Before running any `gh` commands:
8+
9+
1. **Check installation and auth**: Run `gh auth status`. If it reports "not logged in" or the command is not found:
10+
- **If `gh` is not installed**: Ask the user to install it (e.g. `brew install gh` on macOS, or see [GitHub CLI](https://cli.github.com/)) and then authenticate.
11+
- **If `gh` is installed but not configured**: Ask the user to configure it themselves. Provide these instructions to help them:
12+
- Run `gh auth login` and follow the prompts (choose HTTPS or SSH, authenticate via browser or token).
13+
- Ensure the account has the permissions needed for the operation (e.g. read access to the repository, or read/write if the task requires it).
14+
- Do not attempt to authenticate on the user's behalf; only guide them with the commands and link to [GitHub CLI authentication docs](https://cli.github.com/manual/gh_auth_login).
15+
2. **If `gh auth status` succeeds**: Proceed with the steps that require `gh`.
16+
17+
Other skills that depend on `gh` (e.g. get-checks-status) should instruct the agent to ensure GitHub CLI is ready first by following this skill.
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
---
2+
name: create-issue-from-slack-thread
3+
description: >-
4+
Create a GitHub issue from a Slack thread conversation. Use when the user
5+
wants to turn a Slack thread into a GitHub issue, create an issue from a Slack
6+
conversation, or mentions creating issues from Slack links/URLs.
7+
disable-model-invocation: true
8+
---
9+
10+
# Create Issue from Slack Thread
11+
12+
Turn a Slack thread into a well-structured GitHub issue in a Blockscout repository.
13+
14+
## Prerequisites
15+
16+
### 1. GitHub CLI
17+
18+
This workflow uses `gh` to create issues and manage labels. **Follow the check-github-cli skill** first (ensure `gh auth status` succeeds; if not, guide the user to install/configure `gh` and do not proceed).
19+
20+
### 2. Slack MCP Plugin
21+
22+
This workflow uses the Slack MCP plugin (`plugin-slack-slack`) to read thread content. Before proceeding:
23+
24+
- Try calling the `slack_read_thread` MCP tool with a test request to verify connectivity.
25+
- If the Slack MCP server is not available or returns an error, tell the user:
26+
- The Slack plugin must be enabled in Cursor. Go to **Cursor Settings > MCP** and ensure the Slack server is connected and running.
27+
- They may need to re-authenticate the Slack plugin if the session has expired.
28+
- Do not proceed until both `gh` and the Slack plugin are confirmed working.
29+
30+
## Workflow
31+
32+
### Step 1: Parse the Slack Thread URL
33+
34+
The user provides a Slack thread URL. Extract `channel_id` and `message_ts` from it.
35+
36+
Slack thread URLs follow these patterns:
37+
- `https://<workspace>.slack.com/archives/<channel_id>/p<timestamp_without_dot>`
38+
- `https://app.slack.com/client/<workspace_id>/<channel_id>/thread/<channel_id>-<timestamp_without_dot>`
39+
40+
Parsing rules:
41+
- **channel_id**: The segment starting with `C` (e.g., `C04XXXX5DAT`).
42+
- **message_ts**: Take the `p`-prefixed number, remove the `p`, and insert a dot before the last 6 digits. Example: `p1709834567890123` becomes `1709834567.890123`.
43+
44+
If the URL cannot be parsed, ask the user for the `channel_id` and `message_ts` directly.
45+
46+
### Step 2: Read the Slack Thread
47+
48+
Use the `slack_read_thread` MCP tool:
49+
50+
```
51+
Tool: slack_read_thread
52+
Server: plugin-slack-slack
53+
Arguments:
54+
channel_id: "<extracted_channel_id>"
55+
message_ts: "<extracted_message_ts>"
56+
limit: 200
57+
```
58+
59+
If the thread has more than 200 messages, use the `cursor` parameter to paginate and read the full conversation.
60+
61+
### Step 3: Summarize the Conversation
62+
63+
Analyze the full thread and produce a technical summary that captures:
64+
65+
- The core problem or request being discussed
66+
- Relevant technical details (error messages, stack traces, affected components, versions)
67+
- Steps to reproduce if applicable
68+
- Any proposed solutions or workarounds mentioned
69+
- Acceptance criteria or expected behavior if discussed
70+
71+
**Mandatory rules for the summary:**
72+
- **Never** include a link to the original Slack thread
73+
- **Never** include names of team members or attribute statements to specific people
74+
- Write in neutral, third-person technical language
75+
76+
### Step 4: Determine the Target Repository
77+
78+
Ask the user which Blockscout repository the issue should be created in. To help them decide, fetch the list of public repositories:
79+
80+
```bash
81+
gh repo list blockscout --source --no-archived --limit 100 --json name,description --jq '.[] | "\(.name): \(.description)"'
82+
```
83+
84+
Present the most relevant repositories based on the conversation topic and ask the user to confirm the target repository. Always wait for explicit confirmation before proceeding.
85+
86+
### Step 5: Fetch Available Labels
87+
88+
Retrieve labels from the chosen repository:
89+
90+
```bash
91+
gh label list --repo blockscout/<repo_name> --json name,description --limit 100
92+
```
93+
94+
Based on the issue content, select labels that correspond to the problem described. **Do not add a label if none of the available labels match the issue topic.** It is acceptable to have zero labels.
95+
96+
### Step 6: Compose the Issue
97+
98+
Draft the issue with:
99+
100+
- **Title**: A clear, concise summary of the problem or request (imperative mood preferred, e.g., "Fix X" or "Add support for Y").
101+
- **Description**: A well-structured body using this template:
102+
103+
```markdown
104+
## Description
105+
106+
[Core problem or request in 2-3 sentences]
107+
108+
## Details
109+
110+
[Technical details, error messages, affected components]
111+
112+
## Steps to Reproduce
113+
114+
[If applicable — numbered steps]
115+
116+
## Expected Behavior
117+
118+
[What should happen instead, or acceptance criteria]
119+
120+
## Additional Context
121+
122+
[Any other relevant technical information from the discussion]
123+
```
124+
125+
Omit any section that has no content rather than leaving it empty.
126+
127+
**Mandatory rules for the issue:**
128+
- **Never** include a link to the original Slack thread
129+
- **Never** include names of team members or attribute statements to specific people
130+
131+
### Step 7: User Confirmation
132+
133+
Before creating the issue, present the following to the user and ask for confirmation:
134+
135+
1. **Repository**: `blockscout/<repo_name>`
136+
2. **Title**: the proposed title
137+
3. **Description**: the full issue body
138+
4. **Label(s)**: the selected labels (or "None" if no labels match)
139+
140+
Wait for the user to confirm or request changes. Apply any requested changes and re-confirm if needed.
141+
142+
### Step 8: Create the Issue
143+
144+
Once confirmed, create the issue:
145+
146+
```bash
147+
gh issue create \
148+
--repo blockscout/<repo_name> \
149+
--title "<title>" \
150+
--body "<body>"
151+
```
152+
153+
If labels were selected, add them:
154+
155+
```bash
156+
gh issue edit <issue_number> --repo blockscout/<repo_name> --add-label "<label1>" --add-label "<label2>"
157+
```
158+
159+
Alternatively, pass labels at creation time if supported:
160+
161+
```bash
162+
gh issue create \
163+
--repo blockscout/<repo_name> \
164+
--title "<title>" \
165+
--body "<body>" \
166+
--label "<label1>" --label "<label2>"
167+
```
168+
169+
After creation, display a clickable link to the new issue.

0 commit comments

Comments
 (0)