rab-react SKILL.md skillA
rab-react from ximing/rab is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add ximing/rab/rab-react@git:20260831.cf0c308Pins git:20260831.cf0c308 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- ximing/rab
- Path
skills/rab-react/SKILL.md- Versions recorded
- 3
- Latest version
- git:20260831.cf0c308, committed Aug 31, 2026
- First version recorded
- Aug 5, 2026
- Size
- 21,841 bytes
- Repository stars
- 12
- License
- MIT
React响应式状态管理库,用于 `@rabjs/react` 包的 React 响应式开发指导。当用户提到 `@rabjs/react`、响应式组件、`RSRoot`、`RSStrict`、`observer`、`view`、`useService`、`useObserver`、`bindServices`、Service 注入、可观察状态管理或相关页面改造时,应优先使用这个 skill。覆盖 `@rabjs/react` 的核心模式、包内导出的组件名称 `RSRoot` 与 `RSStrict`,以及 observer/view 模式、依赖注入、Service 生命周期、异步状态追踪、事件系统和领域架构。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# @rabjs/react 快速参考
这是为大模型优化的 `@rabjs/react` (RSJS) 快速参考指南,聚焦最核心的使用模式。
## 🎯 五大核心概念
### 1. 响应式组件:`observer` 和 `view`
**基本规则**:组件必须使用 `observer` 或 `view` 包裹才能自动响应状态变化。
```typescript·
import { observer, view } from "@rabjs/react";
// ✅ 方式 1:observer(推荐用于函数组件)
const Counter = observer(() => {
const service = useService(CounterService);
return <div>{service.count}</div>; // 自动追踪 count 变化
});
// ✅ 方式 2:view(支持类组件和函数组件)
class Counter extends React.Component {
render() {
const { store } = this.props;
return <div>{store.count}</div>;
}
}
export default view(Counter);
// ❌ 错误:忘记使用 observer
const Counter = () => {
const service = useService(CounterService);
return <div>{service.count}</div>; // 不会自动更新!
};
```
**关键点**:
- 必须在 `observer` 内部访问 observable 属性
- 不要解构 observable 对象(会破坏响应性)
- `view` 和 `observer` 功能相同,`view` 额外支持类组件
### 2. Service:业务逻辑容器
**基本规则**:所有业务逻辑都应该封装在 Service 类中,包括组件内的操作方法。
```typescript
import { Service } from "@rabjs/react";
export class CounterService extends Service {
// 属性自动是 observable
count = 0;
// 方法自动是 action(批量更新)
increment() {
this.count++;
}
decrement() {
this.count--;
}
// 计算属性(getter)
…Read the whole file at its exact version.
How to install
mdr add ximing/rab/rab-react@sha256:1a9bae269c7afa6aThe line at the top of this page pins the label git:20260831.cf0c308, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_nsv234z4tvzl77eq)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Aug 5, 2026 and Aug 31, 2026, about one every 13 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260831.cf0c308 latest | 2026-08-31 | cf0c308 | 21,841 B | A | view · diff |
| git:20260825.d8c722b | 2026-08-25 | d8c722b | 21,665 B | A | view · diff |
| git:20260805.089655f | 2026-08-05 | 089655f | 21,667 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (21841 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
ximing/rab · 12 stars · license MIT · pushed 2026-11-02 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_nsv234z4tvzl77eq GET https://markdownregistry.com/api/v1/resolve?ref=ximing/rab/rab-react GET https://markdownregistry.com/api/v1/blob/1a9bae269c7afa6a929b43164197bdc98ed774491400fc7cb89af466190cdf7c
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.