-
Notifications
You must be signed in to change notification settings - Fork 39
feat: add /neuronwriter slash command for content optimization #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,188 @@ | ||
| --- | ||
| description: NeuronWriter content optimization - analyze keywords, score content, get NLP recommendations | ||
| agent: Build+ | ||
| mode: subagent | ||
| --- | ||
|
|
||
| Optimize content for SEO using NeuronWriter's NLP analysis API. | ||
|
|
||
| Arguments: $ARGUMENTS | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Step 1: Parse Arguments | ||
|
|
||
| Parse `$ARGUMENTS` to determine the action: | ||
|
|
||
| ```text | ||
| /neuronwriter analyze <keyword> [options] → Create query + get NLP recommendations | ||
| /neuronwriter score <query-id> <url-or-html> → Score content against a query | ||
| /neuronwriter import <query-id> <url-or-html> → Import content into NeuronWriter editor | ||
| /neuronwriter get <query-id> → Get recommendations for existing query | ||
| /neuronwriter content <query-id> → Get saved content from editor | ||
| /neuronwriter projects → List all projects | ||
| /neuronwriter queries <project-id> [options] → List queries in a project | ||
| /neuronwriter status → Check API key configuration | ||
| ``` | ||
|
|
||
| If only a keyword is provided (no subcommand), default to `analyze`. | ||
|
|
||
| ### Step 2: Check API Key | ||
|
|
||
| ```bash | ||
| source ~/.config/aidevops/mcp-env.sh | ||
| if [[ -z "$NEURONWRITER_API_KEY" ]]; then | ||
| echo "NEURONWRITER_API_KEY not configured." >&2 | ||
| echo "Set it with: bash ~/.aidevops/agents/scripts/setup-local-api-keys.sh set NEURONWRITER_API_KEY \"your_key\"" >&2 | ||
| echo "Get your key from: NeuronWriter profile > Neuron API access tab" >&2 | ||
| echo "Requires Gold plan or higher." >&2 | ||
| exit 1 | ||
| fi | ||
| ``` | ||
|
|
||
| ### Step 3: Read the NeuronWriter Subagent | ||
|
|
||
| Read `seo/neuronwriter.md` for full API reference, then execute the appropriate endpoint. | ||
|
|
||
| ### Step 4: Execute Action | ||
|
|
||
| **For `analyze` (default):** | ||
|
|
||
| 1. List projects to find the right one (or use `--project <id>` if provided) | ||
| 2. Call `/new-query` with the keyword | ||
| 3. Poll `/get-query` every 15 seconds until `status == "ready"` (max 5 minutes) | ||
| 4. Present NLP recommendations in a structured format | ||
|
|
||
| **For `score`:** | ||
|
|
||
| 1. Call `/evaluate-content` with the query ID and URL or HTML | ||
| 2. Report the content score | ||
|
|
||
| **For `import`:** | ||
|
|
||
| 1. Call `/import-content` with the query ID and URL or HTML | ||
| 2. Report the content score and editor URL | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| **For `get`:** | ||
|
|
||
| 1. Call `/get-query` with the query ID | ||
| 2. Present recommendations (terms, ideas, competitors) | ||
|
|
||
| **For `content`:** | ||
|
|
||
| 1. Call `/get-content` with the query ID | ||
| 2. Return the saved HTML content, title, and description | ||
|
|
||
| **For `projects`:** | ||
|
|
||
| 1. Call `/list-projects` | ||
| 2. Display project names, IDs, languages, and engines | ||
|
|
||
| **For `queries`:** | ||
|
|
||
| 1. Call `/list-queries` with the project ID | ||
| 2. Optionally filter by `--status`, `--keyword`, `--tag` | ||
|
|
||
| ### Step 5: Report Results | ||
|
|
||
| **For `analyze`, present recommendations as:** | ||
|
|
||
| ```text | ||
| Keyword: "trail running shoes" | ||
| Query ID: 32dee2a89374a722 | ||
| Query URL: https://app.neuronwriter.com/analysis/view/32dee2a89374a722 | ||
|
|
||
| NLP Terms (Content): | ||
| - trail running shoes (use 8-12 times) | ||
| - running shoe (use 3-5 times) | ||
| - trail runners (use 2-4 times) | ||
| ... | ||
|
|
||
| Suggested Headings (H2): | ||
| - Best Trail Running Shoes for 2025 | ||
| - How to Choose Trail Running Shoes | ||
| ... | ||
|
|
||
| Content Ideas: | ||
| - What makes trail running shoes different from road shoes? | ||
| - How often should you replace trail running shoes? | ||
| ... | ||
|
|
||
| Competitors (Top 5): | ||
| 1. runnersworld.com - Score: 87 | ||
| 2. rei.com - Score: 82 | ||
| ... | ||
|
|
||
| Word Count Target: 2,500-3,000 | ||
| ``` | ||
|
|
||
| **For `score` / `import`:** | ||
|
|
||
| ```text | ||
| Content Score: 72/100 | ||
| Query: 32dee2a89374a722 | ||
| ``` | ||
|
|
||
| ## Options | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `--project <id>` | Project ID (skips project selection) | | ||
| | `--engine <engine>` | Search engine (default: `google.com`) | | ||
| | `--language <lang>` | Content language (default: `English`) | | ||
|
|
||
| ## Examples | ||
|
|
||
| **Analyze a keyword:** | ||
|
|
||
| ```text | ||
| /neuronwriter trail running shoes | ||
| ``` | ||
|
|
||
| **Analyze with specific project and engine:** | ||
|
|
||
| ```text | ||
| /neuronwriter analyze "best running gear" --project ed0b47151fb35b02 --engine google.co.uk | ||
| ``` | ||
|
|
||
| **Score a URL against an existing query:** | ||
|
|
||
| ```text | ||
| /neuronwriter score 32dee2a89374a722 https://example.com/running-shoes | ||
| ``` | ||
|
|
||
| **Import content into the editor:** | ||
|
|
||
| ```text | ||
| /neuronwriter import 32dee2a89374a722 https://example.com/running-shoes | ||
| ``` | ||
|
|
||
| **Get recommendations for an existing query:** | ||
|
|
||
| ```text | ||
| /neuronwriter get 32dee2a89374a722 | ||
| ``` | ||
|
|
||
| **List all projects:** | ||
|
|
||
| ```text | ||
| /neuronwriter projects | ||
| ``` | ||
|
|
||
| **List ready queries in a project:** | ||
|
|
||
| ```text | ||
| /neuronwriter queries ed0b47151fb35b02 --status ready | ||
| ``` | ||
|
|
||
| **Check API key status:** | ||
|
|
||
| ```text | ||
| /neuronwriter status | ||
| ``` | ||
|
|
||
| ## Related | ||
|
|
||
| - `seo/neuronwriter.md` - Full API reference and authentication details | ||
| - NeuronWriter requires Gold plan or higher for API access | ||
| - API requests consume the same monthly limits as the NeuronWriter UI | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better readability and to avoid repeating
>&2on each line, consider using a singleechocommand with a multi-line string to output the error message.