home / skills / bdambrosio / cognitive_workbench / generate-note

generate-note skill

/src/tools/generate-note

This skill generates new text or code from scratch using a natural language prompt, returning fresh content without relying on source documents.

npx playbooks add skill bdambrosio/cognitive_workbench --skill generate-note

Review the files below or copy the command above to add this skill to your agents.

Files (2)
Skill.md
1.3 KB
---
name: generate-note
type: python
description: "Generate new text or code content from scratch using natural language prompt via LLM. Creates content from the LLM's own knowledge — no source documents."
---

# generate-note

LLM-based content generation. Creates new text or code from scratch using natural language instructions.
No source documents — for generation from source material, use `synthesize` instead.

## Input

- `prompt`: Generation instruction (required)
- `style`: `"code"` or `"text"` (optional, default: `"text"`)

## Output

Success (`status: "success"`):
- `value`: Generated content (text or code)

Failure (`status: "failed"`):
- `reason`: Error description

## Behavior

- **text** (default): Generates prose, summaries, explanations (temperature=0.7)
- **code**: Generates code with stricter formatting (temperature=0.2)

## Planning Notes

- Use for creating NEW content from scratch (no source material)
- Use `extract` for deriving content from a single Note
- Use `synthesize` for integrating content from multiple documents
- Do NOT pass context — use `synthesize` with source Collections instead

## Examples

```json
{"type":"generate-note","prompt":"Write a Python fibonacci function","style":"code","out":"$fib"}
{"type":"generate-note","prompt":"Explain quantum computing basics","out":"$explanation"}
```

Overview

This skill generates new text or code content from a natural language prompt using a language model. It produces original outputs without ingesting or relying on source documents. Choose a style of either prose or code to control tone and formatting.

How this skill works

Provide a prompt describing the desired output and an optional style flag ("text" or "code"). The skill runs the model with different temperature settings depending on style: a higher temperature for creative prose and a lower temperature for precise code. It returns a success payload with the generated content or a failure payload with an error reason.

When to use it

  • Creating new articles, blog drafts, or summaries from scratch.
  • Generating code snippets, helper functions, or configuration files.
  • Drafting emails, marketing copy, or product descriptions quickly.
  • Prototyping documentation, examples, or tutorials without source input.
  • When you need content based solely on the model's knowledge rather than specific documents.

Best practices

  • Give a clear, specific prompt with required constraints and examples if needed.
  • Select style="code" for programming outputs to get stricter formatting and lower randomness.
  • Use short follow-up prompts to refine output rather than sending very long single prompts.
  • Validate generated code before running it and add tests where applicable.
  • Avoid passing external context; use the appropriate synthesize/extract workflows when working from source documents.

Example use cases

  • Write a Python function to compute Fibonacci numbers (style="code").
  • Generate a 300-word product description for a wearable health tracker.
  • Produce a step-by-step tutorial explaining a machine learning concept.
  • Create unit test scaffolding for a small module in JavaScript.
  • Draft a concise investor update email summarizing recent milestones.

FAQ

Can I provide source documents for the generation?

No. This skill generates content from the model's own knowledge. Use a synthesis workflow when you need to integrate specific source documents.

What controls randomness and style?

The skill uses higher temperature for text (creative) and lower temperature for code (deterministic). You can refine results with prompt specificity and iterative prompts.