### Initialize New Project for AI Agent Source: https://github.com/yusukebe/skills/blob/main/src/landing.template.md Copy this line into your AI agent at the start of a new project to fetch the initial project setup markdown. ```text fetch {{origin}}/start.md to start a new project ``` -------------------------------- ### Install rj with Homebrew Source: https://github.com/yusukebe/skills/blob/main/skills/rj/SKILL.md Install the rj CLI tool using Homebrew. This is the recommended installation method. ```shell brew install yusukebe/tap/rj ``` -------------------------------- ### Develop and Preview Locally Source: https://github.com/yusukebe/skills/blob/main/README.md Install dependencies and run the development server for local preview. The registry is automatically regenerated from skill files during development. ```sh bun install bun run dev # local preview at http://localhost:8787 ``` -------------------------------- ### Install workers-fetch CLI Source: https://github.com/yusukebe/skills/blob/main/skills/workers-fetch/SKILL.md Install the workers-fetch CLI globally using npm. ```sh npm install -g workers-fetch ``` -------------------------------- ### Fetch Skills On Demand Source: https://github.com/yusukebe/skills/blob/main/README.md Use this command to start a new project by fetching the 'start.md' file from the skills catalog. This allows the agent to discover and drill down into necessary skills. ```sh fetch https://skills.yusuke.run/start.md to start a new project ``` -------------------------------- ### workers-fetch with a Pinned Configuration File Source: https://github.com/yusukebe/skills/blob/main/skills/workers-fetch/SKILL.md Specify a particular wrangler configuration file (e.g., wrangler.toml) to be used for starting the Worker. ```sh # Pin a config file workers-fetch -c wrangler.toml /api/test ``` -------------------------------- ### Add Local Skills Catalog Source: https://github.com/yusukebe/skills/blob/main/README.md Install the skills catalog locally for tools that integrate with the 'skills' CLI. This allows agents to match skills by description without an HTTP fetch. ```sh npx skills add yusukebe/skills ``` -------------------------------- ### rj Example JSON Output Source: https://github.com/yusukebe/skills/blob/main/skills/rj/SKILL.md An example of the JSON output produced by the rj CLI, showing status code, headers, protocol, and timing information. ```json { "code": 200, "header": { "content-type": "application/json" }, "protocol": "HTTP/1.1", "status": "200 OK", "timing": { "dns_lookup": 0.48, "tcp_connection": 0.21, ... } } ``` -------------------------------- ### Hono Server Setup with Inertia Middleware Source: https://github.com/yusukebe/skills/blob/main/skills/hono-inertia/SKILL.md Configure Hono to use the Inertia middleware, providing `c.render(name, props)` for Inertia responses. This middleware handles returning HTML on initial requests and JSON for subsequent client navigations based on the `X-Inertia` header. ```typescript import { Hono } from 'hono' import { inertia } from '@hono/inertia' import { rootView } from './root-view' const app = new Hono() app.use(inertia({ rootView })) const routes = app .get('/', (c) => c.render('Home', { message: 'Hono x Inertia' })) .get('/users', (c) => c.render('Users/Index', { users: listUsers() })) .get('/users/:id{[0-9]+}', (c) => { const id = Number(c.req.param('id')) const user = findUser(id) if (!user) return c.notFound() return c.render('Users/Show', { user }) }) export default routes ``` -------------------------------- ### Basic workers-fetch Usage Source: https://github.com/yusukebe/skills/blob/main/skills/workers-fetch/SKILL.md Execute a GET request to the root path of a Cloudflare Worker. The tool auto-detects wrangler.jsonc in the current working directory. ```sh # GET / — auto-detects wrangler.jsonc in cwd workers-fetch ``` -------------------------------- ### Create a New Hono Project Source: https://github.com/yusukebe/skills/blob/main/skills/hono/SKILL.md Use `bun create hono` to scaffold a new Hono project. This command sets up the project structure for a chosen deployment target like Cloudflare Workers or Bun. ```sh bun create hono@latest my-app ``` -------------------------------- ### Run Tests and Formatting Locally Source: https://github.com/yusukebe/skills/blob/main/skills/hono-review/SKILL.md Commands to execute tests and fix formatting/linting issues when a local checkout is necessary. Test failures block merging, while formatting changes should be committed by the contributor. ```shell bun run test bun run format:fix && bun run lint:fix ``` -------------------------------- ### Add a New Skill Source: https://github.com/yusukebe/skills/blob/main/README.md Follow these steps to add a new skill to the catalog. This involves creating a Markdown file for the skill and then previewing and deploying it. ```sh bun run dev # local preview at http://localhost:8787 ``` -------------------------------- ### Client-side Inertia App Initialization Source: https://github.com/yusukebe/skills/blob/main/skills/hono-inertia/SKILL.md Initialize the Inertia app on the client using `createInertiaApp` from `@ts-76/inertia-hono-jsx`. This function handles resolving page components and mounting the application. It uses `hydrateRoot` or `createRoot` based on whether the root element is server-rendered. ```typescript import { createInertiaApp } from '@ts-76/inertia-hono-jsx' createInertiaApp({ resolve: (name) => { const pages = import.meta.glob('./pages/**/*.tsx', { eager: true }) return pages[`./pages/${name}.tsx`] }, }) ``` -------------------------------- ### Verify local skill addition Source: https://github.com/yusukebe/skills/blob/main/AGENTS.md This command lists all skills with their descriptions from a local path, useful for verifying structural changes before pushing. ```bash npx skills add /Users/yusuke/work/skills --list ``` -------------------------------- ### Add a new skill to yusukebe/skills Source: https://github.com/yusukebe/skills/blob/main/skills/contribute/SKILL.md Use this script to create a new branch, add a new skill file to the repository, and prepare for a pull request. Ensure the `NAME` variable is set to your skill's kebab-case name. ```sh NAME= BRANCH=add-skill-$NAME MAIN_SHA=$(gh api repos/yusukebe/skills/git/refs/heads/main --jq '.object.sha') gh api repos/yusukebe/skills/git/refs \ -f ref="refs/heads/$BRANCH" \ -f sha="$MAIN_SHA" gh api -X PUT "repos/yusukebe/skills/contents/skills/$NAME/SKILL.md" \ -f message="add $NAME skill" \ -f branch="$BRANCH" \ -f content="$(base64 < /tmp/SKILL.md)" ``` -------------------------------- ### Repository Layout Overview Source: https://github.com/yusukebe/skills/blob/main/README.md This text block outlines the directory structure of the skills repository, indicating the location of skill files, build scripts, source code, and configuration. ```text .\n├── AGENTS.md # Instructions for AI agents working in this repo\n├── README.md # This file\n├── skills/ # One directory per skill, each containing SKILL.md\n│ └── /SKILL.md\n├── scripts/\n│ └── build-registry.ts # Scans skills/*/SKILL.md, writes src/registry.generated.ts\n├── src/\n│ ├── index.ts # Hono routes\n│ ├── landing.ts # Renders the / and /start.md responses\n│ ├── landing.template.md # Template for /\n│ ├── start.template.md # Template for /start.md (with {{skills}} placeholder)\n│ ├── frontmatter.ts # Minimal YAML frontmatter parser\n│ ├── registry.generated.ts # Build output — frontmatter for every skill (gitignored)\n│ └── skills.ts # Reads the generated registry, fetches bodies via env.ASSETS\n└── wrangler.jsonc ``` -------------------------------- ### Fetch URL Metadata with rj Source: https://github.com/yusukebe/skills/blob/main/skills/rj/SKILL.md Use rj to fetch the metadata of a given URL. The output is in JSON format. ```shell rj https://skills.yusuke.run/skills.json ``` -------------------------------- ### Open and auto-merge a pull request for a new skill Source: https://github.com/yusukebe/skills/blob/main/skills/contribute/SKILL.md After adding the skill file, use these commands to open a pull request against the main branch and enable auto-merge. This automates the deployment process via Cloudflare Workers Builds. ```sh gh pr create \ --repo yusukebe/skills \ --base main \ --head "$BRANCH" \ --title "add $NAME skill" \ --body "Adds the $NAME skill. Auto-proposed from another project." gh pr merge --repo yusukebe/skills "$BRANCH" --squash --auto ``` -------------------------------- ### Update an existing skill in yusukebe/skills Source: https://github.com/yusukebe/skills/blob/main/skills/contribute/SKILL.md To update an existing skill, first fetch the current file's SHA. Then, use this script to create a branch, update the skill file with its new content, and prepare for a pull request. Ensure `NAME` is set and the updated content is in `/tmp/SKILL.md`. ```sh NAME= BRANCH=update-skill-$NAME MAIN_SHA=$(gh api repos/yusukebe/skills/git/refs/heads/main --jq '.object.sha') FILE_SHA=$(gh api "repos/yusukebe/skills/contents/skills/$NAME/SKILL.md?ref=main" --jq '.sha') gh api repos/yusukebe/skills/git/refs \ -f ref="refs/heads/$BRANCH" \ -f sha="$MAIN_SHA" gh api -X PUT "repos/yusukebe/skills/contents/skills/$NAME/SKILL.md" \ -f message="update $NAME skill" \ -f branch="$BRANCH" \ -f content="$(base64 < /tmp/SKILL.md)" \ -f sha="$FILE_SHA" ``` -------------------------------- ### Deploy the Worker Source: https://github.com/yusukebe/skills/blob/main/README.md This script regenerates the skill registry and deploys the Cloudflare Worker. Deployment is automated on pushes to the main branch. ```sh bun run deploy ``` -------------------------------- ### Open and auto-merge a pull request for an updated skill Source: https://github.com/yusukebe/skills/blob/main/skills/contribute/SKILL.md After updating the skill file, use these commands to open a pull request against the main branch and enable auto-merge. This ensures the changes are deployed automatically. ```sh gh pr create \ --repo yusukebe/skills \ --base main \ --head "$BRANCH" \ --title "update $NAME skill" \ --body "Updates the $NAME skill. Auto-proposed from another project." gh pr merge --repo yusukebe/skills "$BRANCH" --squash --auto ``` -------------------------------- ### Extract Header Information with jq Source: https://github.com/yusukebe/skills/blob/main/skills/rj/SKILL.md Pipe the output of rj to jq to extract specific metadata fields, such as the response headers. ```shell rj https://skills.yusuke.run/ | jq '.header' ``` -------------------------------- ### Processing workers-fetch Output with jq Source: https://github.com/yusukebe/skills/blob/main/skills/workers-fetch/SKILL.md Pipe the JSON output of workers-fetch to jq to extract specific fields, such as skill IDs from a skills list. ```sh workers-fetch /skills.json | jq '.body | fromjson | .skills[].id' ``` -------------------------------- ### workers-fetch with Custom HTTP Method, Headers, and Body Source: https://github.com/yusukebe/skills/blob/main/skills/workers-fetch/SKILL.md Perform a POST request with custom headers and a JSON body to a specific API endpoint. ```sh # Other methods, headers, body workers-fetch -X POST -H 'content-type: application/json' -d '{"a":1}' /api/foo ``` -------------------------------- ### Extract Status Code with jq Source: https://github.com/yusukebe/skills/blob/main/skills/rj/SKILL.md Pipe the output of rj to jq to extract specific metadata fields, such as the response status code. ```shell rj https://skills.yusuke.run/ | jq '.code' ``` -------------------------------- ### workers-fetch with a Specific Path Source: https://github.com/yusukebe/skills/blob/main/skills/workers-fetch/SKILL.md Send a request to a specific path within the Cloudflare Worker. ```sh # With a path workers-fetch /skills/hono ``` -------------------------------- ### Inertia Page Component with hono/jsx Source: https://github.com/yusukebe/skills/blob/main/skills/hono-inertia/SKILL.md Define a page component using `hono/jsx` and the `PageComponent` type from `@ts-76/inertia-hono-jsx`. The `PageComponent` type ensures type safety for props, which are generated by `@hono/inertia/vite` from server routes, preventing runtime prop mismatches. ```typescript import { Head, Link, type PageComponent } from '@ts-76/inertia-hono-jsx' const UsersIndex: PageComponent<'Users/Index'> = ({ users }) => (

Users

{users.map((u) => ( {u.name} ))}
) export default UsersIndex ``` -------------------------------- ### workers-fetch with a Longer Timeout Source: https://github.com/yusukebe/skills/blob/main/skills/workers-fetch/SKILL.md Increase the request timeout duration. The default timeout is 3 seconds. ```sh # Longer timeout (default 3s) workers-fetch --timeout 10 /api/slow ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.