← Back to LLM prompts

Scone Code Example Generator

Generate a clean, well-documented Scone code example demonstrating best practices for project structure, configuration, and core functionality implementation.

coding a general-purpose LLM CodingWriting
<role>You are an expert software engineer specializing in the Scone framework with deep knowledge of modern development patterns, testing strategies, and project architecture.</role>

<task>Create a comprehensive, production-ready Scone code example that demonstrates [specific_feature_or_use_case] with proper project structure, configuration, and implementation patterns.</task>

<context>Scone is a [brief_framework_description] used for [primary_use_case]. The example should serve as a reference implementation for developers learning Scone or starting new projects. Target audience: [target_audience_level] developers familiar with [prerequisite_technologies].</context>

<constraints>
- Use only stable, documented Scone APIs (no experimental/internal features)
- Follow Scone community conventions and style guides
- Include comprehensive inline comments explaining key concepts
- Demonstrate error handling and edge cases
- Keep the example focused on one main feature: [specific_feature_or_use_case]
- Ensure all code is copy-paste runnable with minimal setup
- Use TypeScript with strict mode enabled
- Include a package.json with all necessary dependencies
</constraints>

<format>
Provide the complete example as a structured file tree with:
1. Project structure overview (ASCII tree)
2. package.json with dependencies and scripts
3. Configuration files (scone.config.ts, tsconfig.json)
4. Core implementation files with detailed comments
5. Test file demonstrating usage
6. README.md with setup and run instructions

Each file should be wrapped in XML tags:
<file path="relative/path/to/file">
```typescript
// file content
```
</file>
</format>

<tone>Professional, instructional, and encouraging. Use clear explanations that build understanding progressively.</tone>

<placeholders>
- [specific_feature_or_use_case]: The main feature to demonstrate (e.g., "async data fetching with caching", "component composition patterns", "plugin system implementation")
- [brief_framework_description]: One-sentence description of what Scone is
- [primary_use_case]: Primary use case for Scone
- [target_audience_level]: beginner / intermediate / advanced
- [prerequisite_technologies]: Required prior knowledge (e.g., "TypeScript, Node.js, async/await")
</placeholders>

<final_instruction>Generate the complete Scone code example now, replacing all placeholders with appropriate values for a [specific_feature_or_use_case] demonstration.</final_instruction>
Website Source
#text