Skip to content

feat(skill): add slide reorder/remove script for agentic use#2640

Closed
nor3th wants to merge 1 commit into
slidevjs:mainfrom
nor3th:feat/slide-reorder-script
Closed

feat(skill): add slide reorder/remove script for agentic use#2640
nor3th wants to merge 1 commit into
slidevjs:mainfrom
nor3th:feat/slide-reorder-script

Conversation

@nor3th

@nor3th nor3th commented Jun 19, 2026

Copy link
Copy Markdown

Hi

I have found the approach quite great to develop the slides through agentic AI interaction using claude code. However for some tasks (swap slides, move slide 10 after the current slide 20 or delete slide 10) claude code used too many tokens and took too long, hence I let it develop those skill additions which make those tasks cheaper and faster.

I am not sure if it is in the project's scope to improve the claude code skills as well or a claude code skill and any other future additions should be conducted in separate repositories. Just let me know if additions like those are useful or if I should just keep them to my own fork.

I haven't written any test cases yet, but I can still work on those if necessary.

Summary

Adds scripts/slide_ops.py to the Slidev skill with three operations:

  • swap N M — swap two slides by 1-based index
  • move N after|before M — reorder a slide relative to another
  • remove N — delete a slide

Manually reordering slides via the Edit tool requires reading ~200 lines verbatim and constructing a large replacement — expensive in tokens and error-prone with Slidev's compound separators (---\nlayout: x\n---). The script handles both simple and compound separators correctly and runs in milliseconds.

Documents usage in SKILL.md so Claude picks it up automatically and responds to natural language like "swap slides 3 and 7".

@netlify

netlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 21f9148
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/6a363347b0a5dd000880a485
😎 Deploy Preview https://deploy-preview-2640--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@nor3th nor3th changed the title Claude code Skill: add slide reorder/remove script for agentic use feat(skill): add slide reorder/remove script for agentic use Jun 19, 2026
@nor3th
nor3th force-pushed the feat/slide-reorder-script branch from 9c23c32 to e5704d8 Compare June 19, 2026 21:18
Adds scripts/swap_slides.py to the Slidev skill with three operations:
- swap N M     — swap two slides by 1-based index
- move N after|before M — reorder a slide relative to another
- remove N     — delete a slide

Manually reordering slides via the Edit tool requires reading ~200 lines
verbatim and constructing a large replacement — expensive in tokens and
error-prone with Slidev's compound separators (---\nlayout: x\n---).
The script handles both simple and compound separators correctly and
runs in milliseconds.

Documents usage in SKILL.md so Claude picks it up automatically and
responds to natural language like "swap slides 3 and 7".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nor3th
nor3th force-pushed the feat/slide-reorder-script branch from e5704d8 to 21f9148 Compare June 20, 2026 06:29
@antfu

antfu commented Jul 3, 2026

Copy link
Copy Markdown
Member

Thank you, I do like this idea but I would prefer to use our existing parser and the same js ecosystem, and then we might be able to do expose some tools via our cli instead of python script. I think we already have some sort of MCP support for the VS Code extension; bringing them to the CLI and the Web server might be a good idea (cc @kermanx).

I am closing this PR for now but I am open for contributions around this idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants