From totto2727
This skill should be used when creating scripts or automation tasks. Relevant when the user asks to write a shell script, create a Deno script, automate a task, or run a one-liner. Common triggers: "write a script", "automate this", "create a CLI script", "shell one-liner", "deno script".
npx claudepluginhub totto2727-org/monorepo --plugin totto2727This skill uses the workspace's default tool permissions.
When creating scripts, follow this priority order:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
When creating scripts, follow this priority order:
deno run <file>)All script files MUST include a shebang line. This ensures scripts are executable with the correct interpreter.
#!/bin/bash
Include required permissions directly in the shebang:
#!/usr/bin/env -S deno run --allow-read --allow-write
After adding the shebang, make the script executable with chmod +x <file>.
Use shell script one-liners for simple operations:
# File operations
find . -name "*.js" -type f | xargs grep "pattern"
# Text processing
grep "pattern" file.txt | sed 's/old/new/g'
# File counting
find . -maxdepth 1 -type f | wc -l
# Directory operations
mkdir -p path/to/dir && cd path/to/dir
# Conditional execution
[ -f file.txt ] && echo "exists" || echo "not found"
Use TypeScript with Deno only when:
Execution: Always use deno run <file> to execute Deno scripts.
// Example: Complex script with variables and branching
const files = Deno.readDirSync('.')
const results: string[] = []
for (const file of files) {
if (file.isFile && file.name.endsWith('.ts')) {
const content = Deno.readTextFileSync(file.name)
if (content.includes('pattern')) {
results.push(file.name)
}
}
}
console.log(results.join('\n'))
Execute with:
deno run --allow-read script.ts
Three principles for Deno scripts:
https://deno.land/...npm: / jsr: prefixes — for all external packages
jsr: over npm: when the package is available on both registries// jsr packages (preferred)
import { Hono } from 'jsr:@hono/hono@4.0.0'
import { HttpException } from 'jsr:@hono/hono@4.0.0/http-exception'
// Deno standard library (via jsr)
import { join } from 'jsr:@std/path@1.0.0'
import { parse } from 'jsr:@std/yaml@1.0.0'
// npm packages (when not available on jsr)
import { z } from 'npm:zod@3.22.4'
import express from 'npm:express@4.21.0'
// NG: URL imports
import { serve } from 'https://deno.land/std@0.208.0/http/server.ts'
import { z } from 'https://deno.land/x/zod@v3.22.4/mod.ts'
Before using external packages, check if Deno built-in APIs can accomplish the task:
// File operations
const content = await Deno.readTextFile('./data.json')
await Deno.writeTextFile('./output.txt', result)
// Directory operations
await Deno.mkdir('./output', { recursive: true })
for await (const entry of Deno.readDir('./src')) {
console.log(entry.name)
}
// Environment variables
const apiKey = Deno.env.get('API_KEY')
// Command execution
const command = new Deno.Command('git', {
args: ['status'],
stdout: 'piped',
})
const { stdout } = await command.output()
The following are strictly prohibited:
node script.js, npm run, etc.python script.py, python3 script.py, pip install, etc.