mechanism-design
Skill for mechanism kinematics, dynamics, and motion analysis
What this skill does
# Mechanism Design Skill
## Purpose
The Mechanism Design skill provides capabilities for mechanism kinematics, dynamics, and motion analysis, enabling systematic design and optimization of mechanical motion systems.
## Capabilities
- Linkage synthesis and analysis
- Cam profile design
- Gear train design and analysis
- Kinematic simulation
- Dynamic force analysis
- Motion optimization
- ADAMS/RecurDyn integration
- Mechanism specification documentation
## Usage Guidelines
### Kinematic Analysis
#### Degrees of Freedom
```
Gruebler's Equation (planar):
DOF = 3(n-1) - 2j1 - j2
Where:
n = number of links (including ground)
j1 = number of full joints (pin, slider)
j2 = number of half joints (cam, gear)
DOF = 1: Constrained mechanism
DOF = 0: Structure
DOF < 0: Over-constrained
```
#### Common Mechanisms
| Mechanism | Links | Joints | DOF | Application |
|-----------|-------|--------|-----|-------------|
| Four-bar | 4 | 4 pins | 1 | Motion generation |
| Slider-crank | 4 | 3 pins + 1 slider | 1 | Reciprocating motion |
| Scotch yoke | 4 | 2 pins + 2 sliders | 1 | Exact sinusoidal |
| Quick return | 4 | 3 pins + 1 slider | 1 | Unequal stroke times |
| Geneva | 2 | Cam joint | Intermittent | Indexing |
### Linkage Design
#### Four-Bar Linkage Types
```
Grashof criterion:
s + l <= p + q
Where:
s = shortest link
l = longest link
p, q = intermediate links
If satisfied: At least one link can rotate fully
Types:
- Crank-rocker: Shortest link is crank
- Double-crank: Shortest link is ground
- Double-rocker: No full rotation
```
#### Position Analysis
```
Loop closure equation:
r2*e^(i*theta2) + r3*e^(i*theta3) - r4*e^(i*theta4) - r1 = 0
Solve for theta3, theta4 given theta2 (input)
Velocity:
omega3 = omega2 * r2 * sin(theta4-theta2) / (r3 * sin(theta4-theta3))
```
#### Transmission Angle
```
mu = angle between coupler and output link
Ideal: mu = 90 degrees
Acceptable: 40 < mu < 140 degrees
Poor: mu < 30 or mu > 150 degrees
```
### Cam Design
#### Cam Profile Types
| Type | Motion | Application |
|------|--------|-------------|
| Plate cam | Translating or oscillating follower | High speed |
| Cylindrical cam | Oscillating follower | Indexing |
| Face cam | Translating follower | Compact |
| Globoidal cam | Oscillating follower | High accuracy |
#### Motion Profiles
```
Common profiles:
1. Parabolic (constant acceleration)
s = (1/2) * a * t^2 for first half
Good: Simple, smooth
Bad: Infinite jerk at transition
2. Simple harmonic
s = (h/2) * (1 - cos(pi*t/T))
Good: Zero velocity at ends
Bad: Finite acceleration at ends
3. Cycloidal
s = h * (t/T - sin(2*pi*t/T)/(2*pi))
Good: Zero acceleration at ends
Bad: Higher peak acceleration
4. Modified trapezoid
Combines constant acceleration with transitions
Good: Low peak acceleration
Bad: More complex
```
#### Pressure Angle
```
tan(alpha) = (dy/dtheta) / (rb + y)
Where:
alpha = pressure angle
dy/dtheta = slope of displacement curve
rb = base circle radius
y = follower displacement
Limit: alpha < 30 degrees (typically)
```
### Gear Train Design
#### Gear Types
| Type | Application | Efficiency |
|------|-------------|------------|
| Spur | Parallel shafts | 98-99% |
| Helical | Parallel shafts, quieter | 97-99% |
| Bevel | Intersecting shafts | 97-98% |
| Worm | High ratio, non-reversing | 50-90% |
| Planetary | Compact, high ratio | 97-98% |
#### Gear Ratios
```
Simple gear train:
i = N2/N1 = omega1/omega2
Compound gear train:
i_total = product of individual ratios
Planetary gear train:
i = 1 + Nring/Nsun (sun fixed)
i = 1/(1 + Nsun/Nring) (ring fixed)
```
#### Gear Geometry
```
Module: m = d/N
Pitch: p = pi * m
Addendum: a = m
Dedendum: b = 1.25 * m
Center distance: C = m * (N1 + N2) / 2
Contact ratio:
CR = (Arc of action) / (Circular pitch)
Minimum CR > 1.2 recommended
```
### Dynamic Analysis
#### Force Analysis
```
Newton-Euler method:
Sum F = m * a_g (for each link)
Sum M_g = I_g * alpha (about mass center)
D'Alembert approach:
Add inertia forces: -m*a, -I*alpha
Solve as static equilibrium
```
#### Shaking Forces and Moments
```
Shaking force = -Sum(m_i * a_i)
Shaking moment = -Sum(I_i * alpha_i + r_i x m_i * a_i)
Balancing strategies:
1. Add counterweights
2. Optimize mass distribution
3. Use multiple cylinders (phase)
```
## Process Integration
- Cross-cutting for mechanical system design processes
## Input Schema
```json
{
"mechanism_type": "linkage|cam|gear|custom",
"motion_requirements": {
"input_motion": "rotation|translation",
"output_motion": "rotation|translation",
"motion_profile": "string or array",
"speed": "number (RPM or m/s)"
},
"constraints": {
"space_envelope": "object",
"force_requirements": "number",
"accuracy": "number"
},
"operating_conditions": {
"load": "number",
"speed_range": "array [min, max]",
"duty_cycle": "string"
}
}
```
## Output Schema
```json
{
"mechanism_design": {
"type": "string",
"configuration": "object",
"link_dimensions": "array"
},
"kinematic_results": {
"position_analysis": "array or function",
"velocity_analysis": "array or function",
"acceleration_analysis": "array or function",
"transmission_angle": "number"
},
"dynamic_results": {
"forces": "array",
"torques": "array",
"shaking_forces": "object"
},
"performance_metrics": {
"pressure_angle": "number (cams)",
"contact_ratio": "number (gears)",
"efficiency": "number"
},
"design_documentation": "reference"
}
```
## Best Practices
1. Start with kinematic requirements
2. Check Grashof criterion for linkages
3. Limit pressure angles in cams
4. Verify adequate contact ratio for gears
5. Analyze dynamics at operating speed
6. Consider balancing for high-speed mechanisms
## Integration Points
- Connects with CAD Modeling for geometry
- Feeds into FEA Structural for stress analysis
- Supports Test Planning for validation
- Integrates with Vibration Analysis for dynamics
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.