用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SAP/fundamental-ngx --skill best-practices命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Add, rename, or remove i18n translation keys in fundamental-ngx (updates FdLanguage interface, .properties files, and generated types)
Migrate a component or directive to Angular 22+ signal-based patterns
Review a pull request against project conventions and Angular 22+ best practices
基于 SOC 职业分类
正在显示 SKILL.md
| name | best-practices |
| description | Audit existing code against project conventions and Angular 22+ best practices |
| argument-hint | ["component-path-or-folder"] |
| context | fork |
| agent | general-purpose |
| allowed-tools | Read, Grep, Glob, Bash(nx *), Bash(wc *) |
If $ARGUMENTS is empty, ask the user for a component path or folder before proceeding.
Audit the code at $ARGUMENTS against the project's conventions. Unlike /review-pr which checks diffs, this audits existing code as-is.
input() / output() / model() / linkedSignal(). Existing @Input() / @Output() decorators are acceptable.host: {} in decorator — no @HostBinding() / @HostListener()@if / @for / @switch — no *ngIf / *ngFor / *ngSwitchstandalone: true (default since Angular 19)allowSignalWrites option in effect() (the option no longer exists)DestroyRef + takeUntilDestroyed() — no custom DestroyedServicecomputed() + host: { '[class]': } — no CssClassBuilder / @applyCssClassngClass / ngStyle (use direct bindings)signal() only when reactive consumer existsmarkForCheck() after signal updatesBehaviorSubject only for async streams, not local stateeffect() for signal side effects — no Subject<void> for trigger-only patternseffect() used for state derivation — use computed() or linkedSignal insteadlinkedSignal used for mutable derived state (e.g., editable fields that reset on input change)signal.set() with same reference — always create new referenceseffect() / computed() — tracked signals read before conditional logicInjectionToken for contextual defaults — not @ContentChild assigning to signal inputs{ optional: true }FD_ prefix for component identity tokensChangeDetectionStrategy.OnPushfd- selector prefixcomputed() not inlineconsole.log / console.warn (except intentional deprecation warnings)any types (use proper generics or unknown)fixture.componentRef.setInput() for signal inputs*Module classes<h2 fd-title> not <fd-title>)<fd-card> not <div fd-card>)fdLayoutGridCol directive value used for small breakpoint (there is no colSm — the default/small breakpoint is set via the fdLayoutGridCol input itself)[fd-card-title], [fd-card-subtitle] are attribute directives before using them as elements## Best Practices Audit: [component name]
**Overall Score:** X / 8 sections passing
### Section Scores
| Section | Status | Issues |
|--------------------|--------|--------|
| Angular Patterns | PASS | 0 |
| State Management | WARN | 2 |
| DI Patterns | PASS | 0 |
| Component Structure| FAIL | 3 |
| Code Quality | PASS | 0 |
| Testing | WARN | 1 |
| Documentation | FAIL | 2 |
| Selector Usage | PASS | 0 |
### Findings (by severity)
**Blocking**
- [file:line] Issue — convention reference
**Suggestions**
- [file:line] Issue — convention reference
**Nits**
- [file:line] Issue — convention reference
### Migration Items
Items that require `/migrate` to fix:
- [file] 5 @Input decorators → input()
- [file] 3 *ngIf → @if