How this skill is triggered — by the user, by Claude, or both
Slash command
/syntek-dev-suite:stack-shared-libThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Last Updated**: 29/12/2025
Last Updated: 29/12/2025 Version: 1.3.1 Maintained By: Development Team Language: British English (en_GB) Timezone: Europe/London
| Layer | Technology |
|---|---|
| Context | Shared Logic/UI for React (Web) and React Native (Mobile) |
| Environment | Node.js (Host machine or Docker) |
| Build Tool | tsup / Rollup (ESM & CJS output) |
| Language | TypeScript (Strict mode) |
| Testing | Vitest or Jest |
| Task | Command |
|---|---|
| Build package | npm run build |
| Watch mode | npm run watch |
| Run tests | npm test |
| Link locally | npm link or yalc push |
| Lint | npm run lint |
| Publish | npm publish |
CRITICAL: Shared code must work on BOTH web and mobile.
| Avoid | Alternative |
|---|---|
window, document | Platform detection or conditional imports |
fs, path (Node APIs) | Only in build tools, not runtime code |
localStorage | Abstract to platform-specific adapters |
fetch (browser-specific) | Use cross-platform HTTP client |
// BAD - Will crash on React Native
const width = window.innerWidth;
// GOOD - Platform-safe
import { Platform, Dimensions } from 'react-native';
const width = Platform.OS === 'web'
? window.innerWidth
: Dimensions.get('window').width;
// Option 1: Primitive props
interface ButtonProps {
variant: 'primary' | 'secondary';
size: 'sm' | 'md' | 'lg';
}
// Option 2: Style prop
interface CardProps {
style?: ViewStyle | CSSProperties;
}
CRITICAL: Ensure correct exports configuration.
{
"name": "@company/shared",
"version": "1.0.0",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
"files": ["dist"],
"sideEffects": false
}
| Version Bump | When to Use |
|---|---|
| Major (X.0.0) | Breaking changes |
| Minor (0.X.0) | New features (backwards compatible) |
| Patch (0.0.X) | Bug fixes (backwards compatible) |
1. Make changes to shared lib
↓
2. Run `npm run build`
↓
3. Link to consuming app:
- `npm link` (in shared lib)
- `npm link @company/shared` (in consuming app)
OR
- `yalc push` (in shared lib)
- `yalc add @company/shared` (in consuming app)
↓
4. Test in consuming app
↓
5. Bump version in package.json
↓
6. Commit and publish
packages/shared/
├── src/
│ ├── index.ts # Main exports
│ ├── components/
│ │ ├── Button.tsx
│ │ └── Card.tsx
│ ├── hooks/
│ │ ├── useAuth.ts
│ │ └── useFetch.ts
│ ├── utils/
│ │ ├── formatters.ts
│ │ └── validators.ts
│ └── types/
│ └── index.ts
├── dist/ # Built output (gitignored)
├── package.json
├── tsconfig.json
└── tsup.config.ts # Or rollup.config.js
import { describe, it, expect } from 'vitest';
import { formatCurrency } from './formatters';
describe('formatCurrency', () => {
it('formats GBP correctly', () => {
expect(formatCurrency(1234.56, 'GBP')).toBe('£1,234.56');
});
it('handles zero', () => {
expect(formatCurrency(0, 'GBP')).toBe('£0.00');
});
});
npx claudepluginhub syntek-dev/syntek-dev-suite --plugin syntek-dev-suiteProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.