All skills
onmax avatar

/vueuse-functions

@de09c7b official
by Maxonmax/nuxt-skills715 stars
38

Apply VueUse composables where appropriate to build concise, maintainable Vue.js / Nuxt features.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/vueuse-functions

This session only. Nothing lands on disk.

referencesuseCounter.md

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

useCounter

Basic counter with utility functions.

Basic Usage

import { useCounter } from '@vueuse/core'

const { count, inc, dec, set, reset } = useCounter()

Usage with options

import { useCounter } from '@vueuse/core'

const { count, inc, dec, set, reset } = useCounter(1, { min: 0, max: 16 })

Type Declarations

export interface UseCounterOptions {
  min?: number
  max?: number
}
export interface UseCounterReturn {
  /**
   * The current value of the counter.
   */
  readonly count: Readonly<Ref<number>>
  /**
   * Increment the counter.
   *
   * @param {number} [delta=1] The number to increment.
   */
  inc: (delta?: number) => void
  /**
   * Decrement the counter.
   *
   * @param {number} [delta=1] The number to decrement.
   */
  dec: (delta?: number) => void
  /**
   * Get the current value of the counter.
   */
  get: () => number
  /**
   * Set the counter to a new value.
   *
   * @param val The new value of the counter.
   */
  set: (val: number) => void
  /**
   * Reset the counter to an initial value.
   */
  reset: (val?: number) => number
}
/**
 * Basic counter with utility functions.
 *
 * @see https://vueuse.org/useCounter
 * @param [initialValue]
 * @param options
 */
export declare function useCounter(
  initialValue?: MaybeRef<number>,
  options?: UseCounterOptions,
): {
  count: Readonly<
    | Ref<number, number>
    | ShallowRef<number, number>
    | WritableComputedRef<number, number>
  >
  inc: (delta?: number) => number
  dec: (delta?: number) => number
  get: () => number
  set: (val: number) => number
  reset: (val?: number) => number
}

Source: SKILL.md on GitHub

No alerts8d3 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    This skill is a documentation and implementation guide for the VueUse library. It maps developer requirements to reactive composables. While the skill is a legitimate development tool, it provides a surface for indirect prompt injection by demonstrating the ingestion of untrusted data from sources like the clipboard and URL parameters without explicit sanitization patterns.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

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

Last checked against GitHub 3 days ago.

Activeupdated last week
metadata
{
  "author": "SerKo <https://github.com/serkodev>",
  "version": "1.0"
}
compatibility
Requires Vue 3 (or above) or Nuxt 3 (or above) project

README badge

README badge for onmax/nuxt-skills/vueuse-functions