Index of every page on this site: llms.txt
All skills
vite-hub avatar

/slidev

@8c10e89
by ViteHubvite-hub/drop9 stars
Run it yourself

Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.

Use this Skill: https://skilld.dev/gh/vite-hub/drop/slidev

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescore-global-context.md

≈720 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Global Context & API

Access navigation, slide info, and configuration programmatically.

Template Variables

Available in slides and components:

Page {{ $page }} of {{ $nav.total }}
Title: {{ $slidev.configs.title }}

$nav

Navigation state and controls:

Property Type Description
$nav.currentPage number Current page (1-indexed)
$nav.currentLayout string Current layout name
$nav.total number Total slides
$nav.isPresenter boolean In presenter mode
$nav.next() function Next click/slide
$nav.prev() function Previous click/slide
$nav.nextSlide() function Next slide
$nav.prevSlide() function Previous slide
$nav.go(n) function Go to slide n

$slidev

Global context:

Property Description
$slidev.configs Project config (title, etc.)
$slidev.themeConfigs Theme config

$frontmatter

Current slide frontmatter:

Layout: {{ $frontmatter.layout }}

$clicks

Current click count on slide.

$page

Current page number (1-indexed).

$renderContext

Current render context:

  • 'slide' - Normal slide view
  • 'overview' - Overview mode
  • 'presenter' - Presenter mode
  • 'previewNext' - Next slide preview

Composables

Import from @slidev/client:

import {
  useNav,
  useDarkMode,
  useIsSlideActive,
  useSlideContext,
  onSlideEnter,
  onSlideLeave,
} from '@slidev/client'

useNav

const nav = useNav()
nav.next()
nav.go(5)
console.log(nav.currentPage)

useDarkMode

const { isDark, toggle } = useDarkMode()

useIsSlideActive

const isActive = useIsSlideActive()
// Returns ref<boolean>

useSlideContext

const { $page, $clicks, $frontmatter } = useSlideContext()

Lifecycle Hooks

import { onSlideEnter, onSlideLeave } from '@slidev/client'

onSlideEnter((to, from) => {
  // Slide became active
  startAnimation()
})

onSlideLeave((to, from) => {
  // Slide became inactive
  cleanup()
})

Important: Don't use onMounted/onUnmounted in slides - component instance persists. Use onSlideEnter/onSlideLeave instead.

Conditional Rendering Examples

<!-- Show only in presenter mode -->
<div v-if="$nav.isPresenter">
  Presenter notes
</div>

<!-- Hide on cover slide -->
<footer v-if="$nav.currentLayout !== 'cover'">
  Page {{ $nav.currentPage }}
</footer>

<!-- Different content by context -->
<template v-if="$renderContext === 'slide'">
  Normal view
</template>
<template v-else-if="$renderContext === 'presenter'">
  Presenter view
</template>

Type Imports

import type { TocItem } from '@slidev/types'

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning10d3 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    The skill provides a comprehensive guide for using Slidev, a developer-focused presentation tool, including its Model Context Protocol (MCP) server for AI agents. While it offers powerful features like live code execution and direct filesystem edits, these are standard functionalities for developers. However, the ability to read and modify files through the MCP server introduces an attack surface for indirect prompt injection.

  • Socket10d

    No alerts

  • Snyk10d

    Risk: MEDIUM · 1 issue

Signed by skilld at 8c10e89. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month

README badge

README badge for vite-hub/drop/slidev