Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
data-fetching - Skill - OpenSmartRoute
Skillv1.0.0
data-fetching
Read this file to understand how to fetch data in the project.
Instruction file imported from atmannaik/LinkShortener (.github/instructions/data-fetching.instructions.md). Copyright stays with the author.
Data Fetching Guidelines
This document outlines the best practices for fetching data in our Next.js application. Adhering to these guidelines will ensure consistency, performance, and maintainability across the codebase.
1. Use Server Components for Data Fetching
In Next.js, ALWAYS use Server Components for data fetching whenever possible. NEVER use Client Components to fetch data.
2. Data Fetching Methods
ALWAYS use the helper functions in the /data directory to fetch data. NEVER fetch data directly in components.
ALL helper functions in the /data directory should use Drizzle ORM for database interactions.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/atmannaik-linkshortener-data-fetching-instructions/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
{
"ocm": "1",
"id": "atmannaik-linkshortener-data-fetching-instructions",
"kind": "skill",
"name": "data-fetching",
"description": "Read this file to understand how to fetch data in the project.",
"publisher": "atmannaik",
"version": "1.0.0",
"capabilities": {
"domains": [
"general"
],
"tags": [
"skill-md",
"github-instructions"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Read this file to understand how to fetch data in the project."
],
"primary": false,
"metadata": {
"source": {
"provider": "github-instructions",
"repository": "https://github.com/atmannaik/LinkShortener",
"path": ".github/instructions/data-fetching.instructions.md",
"ref": "bee4243a737aa60b4f4f47f002a9646b1e2e4daf",
"url": "https://github.com/atmannaik/LinkShortener/blob/bee4243a737aa60b4f4f47f002a9646b1e2e4daf/.github/instructions/data-fetching.instructions.md",
"key": "atmannaik/LinkShortener/.github/instructions/data-fetching.instructions.md"
}
},
"instructions": "# Data Fetching Guidelines\n\nThis document outlines the best practices for fetching data in our Next.js application. Adhering to these guidelines will ensure consistency, performance, and maintainability across the codebase.\n\n## 1. Use Server Components for Data Fetching\n\nIn Next.js, ALWAYS use Server Components for data fetching whenever possible. NEVER use Client Components to fetch data.\n\n## 2. Data Fetching Methods\n\nALWAYS use the helper functions in the /data directory to fetch data. NEVER fetch data directly in components.\n\nALL helper functions in the /data directory should use Drizzle OR",
"cost": {
"context_tokens": 157
}
}
Fetch it by URL: GET /api/v1/registry/atmannaik-linkshortener-data-fetching-instructions/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.