Skip to content
cccskills
FreePublished on GitHubEnglish overview

llm-generation

Use this skill to organize application LLM generation workflows: reusable versioned prompts, structured outputs, service-level model selection, and tracing. It helps keep workflow identity and prompt identity distinct so generation behavior can be validated and observed consistently.

OriginalShow the original description

Use for application prompts, generateObject/generateText, model selection and generation tracing. Excludes provider adapters and agent snapshots.

lobehub/lobehub83,504 stars(GitHub 83,504 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Moving a reusable prompt into a versioned prompt module
  • Adding structured JSON generation to an application workflow
  • Choosing and tracing the model for a business generation task

Overview

What it does

This skill guides the design of application LLM calls as reusable, traceable workflows. It recommends managing reusable prompts together with their JSON schemas, schema names, and prompt versions, while keeping model configuration, input validation, storage, and error handling in the owning service. For workflows using generateObject or generateText, it distinguishes the business scenario, prompt version, and schema name in tracing, and keeps model selection independent of prompt version. It also covers validating generated results, handling failures, and checking for reuse of old prompts or scenarios.

When it helps

Use it when adding an LLM generation workflow to a service, sharing a long prompt instead of embedding it in the service, or tracking generation quality, duration, and cost by business workflow.

Example requests

  • “Organize this workflow’s prompt and JSON schema so they can be reused.”
  • “Set an appropriate scenario name and prompt version for this LLM call.”
  • “Check structured output validation and failure behavior.”

Notes

Provider adapter conventions and agent execution snapshots are outside this skill’s scope.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Document check

AI checked the SKILL.md for operations that need care and for setup requirements. The score comes only from actually running the skill (hands-on test).

SafetyAre sending data, deleting files, and running commands disclosed?
AGoodThe material describes no data deletion or external sending steps.
Easy setupDoes it need few tools or API keys, and are they documented?
BPartly lackingIt references Bun checks and several packages without providing setup instructions.

Not counted in the score. Rated by AI (OpenAI Codex) as of Oct 26, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (2)

  • SKILL.md4.3 KB
  • agents/openai.yaml264 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

LLM Generation

Implement business-facing LLM calls as explicit, independently observable workflows. Keep prompt identity, model policy, structured output, and tracing responsibilities separate.

Locate the Existing Boundary

Before editing a call, inspect:

  • packages/prompts for reusable application prompts;
  • apps/server/src/services/aiGeneration for the server-side structured generation wrapper;
  • packages/const/src/llmGenerationTracing.ts for scenario names;
  • packages/llm-generation-tracing for tracing option and registry behavior;
  • the owning service for model configuration and business-specific schemas.

Use agent-tracing for execution-snapshot diagnosis and agent-runtime-hooks for lifecycle hook behavior. Neither owns application LLM generation conventions.

Prompt Ownership and Versioning

  • Put a reusable generation contract in packages/prompts/src/chains: the message builder, JSON schema, schema name, and prompt version should be exported together. Do not leave substantial system prompts or model-facing input serialization embedded in a service.
  • Keep execution concerns in the owning server service: model configuration, AiGenerationService, tracing entity IDs, Zod validation, persistence, and business error handling do not belong in the prompt chain.
  • Keep each *_PROMPT_VERSION beside the prompt it versions and export both from the same module.
  • Format versions as v<major> or v<major>.<minor>, for example v1 or v1.2.
  • Store only the version in promptVersion. Do not include a feature or scenario prefix such as expertise-ingestion-v1; scenario carries workflow identity.
  • Bump the version whenever a prompt or output contract changes in a way that should create a separate evaluation or tracing cohort.
export const EXAMPLE_PROMPT_VERSION = 'v1';

export const EXAMPLE_SYSTEM_PROMPT = `...`;

Scenario Semantics

Treat scenario as the stable product workflow and lifecycle-stage partition, not as a label for a prompt, schema, model, or helper.

  • Check TRACING_SCENARIOS before adding a call.
  • Reuse a scenario only for the same user-visible workflow and lifecycle stage.
  • Add a scenario when the business action differs, even if another call shares its prompt or JSON schema. Editable goal-criteria drafting and run-time verification planning are different scenarios.
  • Never borrow a nearby scenario as a placeholder. Doing so contaminates latency, cost, success-rate, and quality data.
  • Pass schemaName for structured generation and relevant entity IDs when available.

Model Policy

  • Resolve the model and provider through the owning service's configuration policy. Do not silently inherit an unrelated chat model.
  • When a workflow requires a stable service model, give it an explicit default and expose the corresponding service-model configuration instead of hardcoding the model only at the call site.
  • Keep model choice separate from prompt version. Changing a configured model does not rename the prompt or scenario.
  • Prefer the shared server generation service when it fits the call so runtime initialization, routing, and tracing remain consistent.

Structured Generation

  • Give each JSON schema a stable, workflow-appropriate name.
  • Keep prompt instructions and schema requirements aligned; required fields in one must be supplied by the other.
  • Validate generated content at the service boundary and preserve the owning service's fallback/error behavior.
  • Do not reuse a schema name to justify reusing an unrelated tracing scenario.

Verification

For every new or corrected generation workflow:

  1. Assert the emitted scenario, promptVersion, and schemaName where applicable.
  2. Test the prompt's important behavioral constraints without snapshotting the entire prose.
  3. Test structured-output validation and relevant failure behavior.
  4. Search for stale inline prompts, old version strings, and incorrectly reused scenarios.
  5. Run bun run check <changed-files...> and bun run check --type for cross-package changes.

Use the testing skill for test mechanics and the typescript skill for TypeScript changes.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

acceptance

FreeSummary

Use this skill to verify a delivery by exercising the real product through a suitable surface such as a CLI, web app, desktop app, or iOS Simulator. It helps create or find a verification plan, capture evidence, and publish an acceptance report.

  • Verifying a completed product change
  • Collecting screenshots or other evidence
  • Creating a verification plan and report
lobehub/lobehub83.5KUpdated Oct 26, 2026

Use this skill to add an AI model provider to LobeHub across runtime integration, model cards, settings, branding, documentation, and acceptance checks. It also covers provider documentation updates and distinguishes new providers from models added to an existing provider.

  • Integrating a new AI model provider into LobeHub
  • Updating setup or usage documentation for a provider
  • Checking whether a model needs a new provider integration
lobehub/lobehub83.5KUpdated Oct 26, 2026

add-setting-env

FreeSummary

Use this skill to add a server-side environment variable that sets a default for a user setting. It walks through validation, server configuration and store merging, plus updating the example environment file and self-hosting documentation.

  • Adding an environment variable for a setting default
  • Wiring a new setting domain into server config
  • Documenting a new variable for self-hosting
lobehub/lobehub83.5KUpdated Oct 26, 2026

Provides guidance for registering hooks around an agent’s execution steps, tool calls, human approvals, context compression, and sub-agent calls. Hooks can observe events, supply local mock tool results, or use webhooks to allow or deny tool results under configured policies.

  • Observing agent steps and tool errors
  • Mocking tool results during local execution
  • Requiring webhook decisions before or after a tool call
lobehub/lobehub83.5KUpdated Oct 26, 2026

agent-signal

FreeSummary

Build event-driven background workflows for agents by defining sources, interpreting them as signals, and running actions through policies. It also guides asynchronous handoffs, deduplication, scoped execution, completion receipts, and observability.

  • Adding a new event source to an agent workflow
  • Routing interpreted signals to concrete background actions
  • Enqueuing work for asynchronous processing
lobehub/lobehub83.5KUpdated Oct 26, 2026

Use this skill to run end-to-end acceptance checks for bot channels in real desktop chat apps. It drives apps such as Discord, Slack, Telegram, WeChat, Lark, and QQ to send a message, wait for a response, and capture the result.

  • Checking a bot response in a real Discord channel
  • Testing chat behavior through Slack or Telegram
  • Capturing a bot interaction in a native macOS app
lobehub/lobehub83.5KUpdated Oct 26, 2026

See all skills by lobehub

Report a problem with this skill