Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: rdc-endpoint-setup
description: Set up @data-client/endpoint for custom async operations. Wraps existing async functions with Endpoint for use with Data Client hooks. Use after rdc-setup detects non-REST/GraphQL async patterns.
name: data-client-endpoint-setup
description: Set up @data-client/endpoint for custom async operations. Wraps existing async functions with Endpoint for use with Data Client hooks. Use after data-client-setup detects non-REST/GraphQL async patterns.
disable-model-invocation: true
---

# Custom Endpoint Setup

This skill configures `@data-client/endpoint` for wrapping existing async functions. It should be applied after `rdc-setup` detects custom async patterns that aren't REST or GraphQL.
This skill configures `@data-client/endpoint` for wrapping existing async functions. It should be applied after `data-client-setup` detects custom async patterns that aren't REST or GraphQL.

## Installation

Expand Down Expand Up @@ -331,8 +331,8 @@ Both hooks and controller methods take endpoint as first argument, with the endp

## Next Steps

1. Apply skill "rdc-schema" to define Entity classes
2. Apply skill "rdc-react" or "rdc-vue" for usage
1. Apply skill "data-client-schema" to define Entity classes
2. Apply skill "data-client-react" or "data-client-vue" for usage

## References

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: rdc-graphql-setup
description: Set up @data-client/graphql for GraphQL APIs. Configures GQLEndpoint with auth and custom options. Use after rdc-setup detects GraphQL patterns.
name: data-client-graphql-setup
description: Set up @data-client/graphql for GraphQL APIs. Configures GQLEndpoint with auth and custom options. Use after data-client-setup detects GraphQL patterns.
disable-model-invocation: true
---

# GraphQL Protocol Setup

This skill configures `@data-client/graphql` for a project. It should be applied after `rdc-setup` detects GraphQL patterns.
This skill configures `@data-client/graphql` for a project. It should be applied after `data-client-setup` detects GraphQL patterns.

## Installation

Expand Down Expand Up @@ -201,8 +201,8 @@ function UserProfile({ id }: { id: string }) {

## Next Steps

1. Apply skill "rdc-schema" to define Entity classes
2. Apply skill "rdc-react" or "rdc-vue" for usage
1. Apply skill "data-client-schema" to define Entity classes
2. Apply skill "data-client-react" or "data-client-vue" for usage

## References

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: rdc-manager
name: data-client-manager
description: Implement @data-client Managers for global side effects - websocket, SSE, polling, subscriptions, logging, middleware, Controller actions, redux pattern
license: Apache 2.0
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: rdc-react-testing
name: data-client-react-testing
description: Test @data-client/react with renderDataHook - jest unit tests, fixtures, interceptors, mock responses, nock HTTP mocking, hook testing, component testing
license: Apache 2.0
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: rdc-react
name: data-client-react
description: Use @data-client/react hooks - useSuspense, useQuery, useCache, useLive, useDLE, useSubscription, useController for fetch/mutations, DataProvider, AsyncBoundary, useLoading, useDebounce
license: Apache 2.0
---
Expand All @@ -23,7 +23,7 @@ const { data, loading, error } = useDLE(TodoResource.get, { id: 5 });
useSubscription(TodoResource.get, { id: 5 });
```

For API definitions (like TodoResource), apply the skill "rdc-rest".
For API definitions (like TodoResource), apply the skill "data-client-rest".

## Mutations

Expand Down Expand Up @@ -112,7 +112,7 @@ const todosByUser = useQuery(groupTodoByUser);
## Managers

Custom [Managers](https://dataclient.io/docs/api/Manager) allow for global side effect handling.
This is useful for webosckets, SSE, logging, etc. Always use the skill "rdc-manager" when writing managers.
This is useful for webosckets, SSE, logging, etc. Always use the skill "data-client-manager" when writing managers.

## Best Practices & Notes

Expand All @@ -139,4 +139,4 @@ For detailed API documentation, see the [references](references/) directory:
- [data-dependency](references/data-dependency.md) - Rendering guide
- [mutations](references/mutations.md);[_VoteDemo.mdx](references/_VoteDemo.mdx) - Mutations guide

**ALWAYS follow these patterns and refer to the official docs for edge cases. Prioritize code generation that is idiomatic, type-safe, and leverages automatic normalization/caching via skill "rdc-schema" definitions.**
**ALWAYS follow these patterns and refer to the official docs for edge cases. Prioritize code generation that is idiomatic, type-safe, and leverages automatic normalization/caching via skill "data-client-schema" definitions.**
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: rdc-rest-setup
description: Set up @data-client/rest for REST APIs. Creates custom RestEndpoint base class with common behaviors (auth, urlPrefix, error handling). Use after rdc-setup detects REST patterns.
name: data-client-rest-setup
description: Set up @data-client/rest for REST APIs. Creates custom RestEndpoint base class with common behaviors (auth, urlPrefix, error handling). Use after data-client-setup detects REST patterns.
disable-model-invocation: true
---

# REST Protocol Setup

This skill configures `@data-client/rest` for a project. It should be applied after skill "rdc-setup" detects REST API patterns.
This skill configures `@data-client/rest` for a project. It should be applied after skill "data-client-setup" detects REST API patterns.

**First, apply the skill "rdc-rest"** for accurate implementation patterns.
**First, apply the skill "data-client-rest"** for accurate implementation patterns.

## Installation

Expand Down Expand Up @@ -218,9 +218,9 @@ export const TodoResource = resource({

## Next Steps

1. Apply skill "rdc-schema" to define Entity classes
2. Apply skill "rdc-rest" for resource and endpoint patterns
3. Apply skill "rdc-react" or "rdc-vue" for usage
1. Apply skill "data-client-schema" to define Entity classes
2. Apply skill "data-client-rest" for resource and endpoint patterns
3. Apply skill "data-client-react" or "data-client-vue" for usage

## References

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: rdc-rest
name: data-client-rest
description: Define REST APIs with @data-client/rest - resource(), RestEndpoint, CRUD, GET/POST/PUT/DELETE, HTTP fetch, normalize, cache, urlPrefix, path parameters
license: Apache 2.0
---
Expand All @@ -12,8 +12,8 @@ This project uses [@data-client/rest](https://dataclient.io/rest) to define, fet

## 1. Defining Schemas

This project uses [schemas](references/schema.md) to define and normalize data models with type safety and automatic cache management. Apply the skill "rdc-schema" for schema patterns.
**Always follow these patterns (apply the skill "rdc-schema") when generating mutable data definitions.**
This project uses [schemas](references/schema.md) to define and normalize data models with type safety and automatic cache management. Apply the skill "data-client-schema" for schema patterns.
**Always follow these patterns (apply the skill "data-client-schema") when generating mutable data definitions.**

## 2. Resources (`resource()`)

Expand Down Expand Up @@ -89,7 +89,7 @@ const deleteTodo = id => ctrl.fetch(TodoResource.delete, { id });
const getNextPage = (page) => ctrl.fetch(TodoResource.getList.getPage, { userId: 1, page })
```

For more detailed usage, apply the skill "rdc-react" or "rdc-vue".
For more detailed usage, apply the skill "data-client-react" or "data-client-vue".

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: rdc-schema
name: data-client-schema
description: Define data schemas - Entity, Collection, Union, Query, pk/primary key, normalize/denormalize, relational/nested data, polymorphic types, Invalidate, Values
license: Apache 2.0
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: rdc-setup
name: data-client-setup
description: Install and set up @data-client/react or @data-client/vue in a project. Detects project type (NextJS, Expo, React Native, Vue, plain React) and protocol (REST, GraphQL, custom), then hands off to protocol-specific setup skills.
disable-model-invocation: true
---
Expand Down Expand Up @@ -187,21 +187,21 @@ After provider setup, apply the appropriate skill based on detected protocol:

### REST APIs

Apply skill **"rdc-rest-setup"** which will:
Apply skill **"data-client-rest-setup"** which will:
1. Install `@data-client/rest`
2. Offer to create a custom `BaseEndpoint` class extending `RestEndpoint`
3. Configure common behaviors: urlPrefix, authentication, error handling

### GraphQL APIs

Apply skill **"rdc-graphql-setup"** which will:
Apply skill **"data-client-graphql-setup"** which will:
1. Install `@data-client/graphql`
2. Create and configure `GQLEndpoint` instance
3. Set up authentication headers

### Custom Async Operations

Apply skill **"rdc-endpoint-setup"** which will:
Apply skill **"data-client-endpoint-setup"** which will:
1. Install `@data-client/endpoint`
2. Offer to wrap existing async functions with `new Endpoint()`
3. Configure schemas and caching options
Expand Down Expand Up @@ -241,9 +241,9 @@ The `DataProvider` must wrap all components that use data-client hooks. Place it
## Next Steps

After core setup and protocol-specific setup:
1. Define data schemas using `Entity` - see skill "rdc-schema"
2. Use hooks like `useSuspense`, `useQuery`, `useController` - see skill "rdc-react" or "rdc-vue"
3. Define REST resources - see skill "rdc-rest"
1. Define data schemas using `Entity` - see skill "data-client-schema"
2. Use hooks like `useSuspense`, `useQuery`, `useController` - see skill "data-client-react" or "data-client-vue"
3. Define REST resources - see skill "data-client-rest"

## References

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: rdc-vue-testing
name: data-client-vue-testing
description: Test @data-client/vue composables and components - renderDataCompose, mountDataClient, fixtures, jest, nock, Vue 3 reactive props, useSuspense testing
license: Apache 2.0
---
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For more details, see [the Installation docs page](https://dataclient.io/docs/ge
npx skills add reactive/data-client
```

Then run [skill](https://agentskills.io) "rdc-setup"
Then run [skill](https://agentskills.io) "data-client-setup"

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/core/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Link from '@docusaurus/Link';

<SkillTabs skill="reactive/data-client" />

Then run skill `/rdc-setup` or:
Then run skill `/data-client-setup` or:

<PkgTabs pkgs="@data-client/react @data-client/test @data-client/rest" />

Expand Down
4 changes: 2 additions & 2 deletions docs/rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ When using TypeScript (optional), version 4.0 or above is required.
display: 'inline', // Inline with text
}}
/> Codegen</Link>&nbsp;
<Link className="button button--secondary button--sm" to="https://github.com/reactive/data-client/blob/master/.cursor/skills/rdc-rest/SKILL.md"><img src="/img/copilot.svg" alt="Github Copilot" style={{
<Link className="button button--secondary button--sm" to="https://github.com/reactive/data-client/blob/master/.cursor/skills/data-client-rest/SKILL.md"><img src="/img/copilot.svg" alt="Github Copilot" style={{
height: '1em', // Match font size
verticalAlign: '-0.125em', // Fine-tune: try -0.125em or 'middle'
display: 'inline', // Inline with text
Expand All @@ -360,4 +360,4 @@ import SkillTabs from '@site/src/components/SkillTabs';

<SkillTabs skill="reactive/data-client" />

Install all `rdc-` skills, then generate REST APIs
Install all `data-client-` skills, then generate REST APIs
2 changes: 1 addition & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For more details, see [the Installation docs page](https://dataclient.io/docs/ge
npx skills add reactive/data-client
```

Then run [skill](https://agentskills.io) "rdc-setup"
Then run [skill](https://agentskills.io) "data-client-setup"

## Usage

Expand Down
2 changes: 1 addition & 1 deletion packages/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For more details, see [the Installation docs page](https://dataclient.io/docs/ge
npx skills add reactive/data-client
```

Then run [skill](https://agentskills.io) "rdc-setup"
Then run [skill](https://agentskills.io) "data-client-setup"

## Usage

Expand Down