lucaswilliameufrasio/agent-skills

explicit-code-style

- Apply explicit, safe coding conventions when writing or reviewing code: use multiline braced control flow, explicit loops, and strict TypeScript value handling.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/lucaswilliameufrasio/agent-skills --skill explicit-code-style

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Explicit code style

Prefer code whose control flow, errors, types, and absence semantics are visible at a glance. Apply these conventions without exposing implementation details or changing contracts. Follow the current repository's AGENTS.md and tool-enforced rules when they add stricter constraints; never use that as a reason to weaken the API JSON rule below.

Multiline control flow

Write if, for, and while statements with braces and a multiline body where the language supports them. Avoid single-line control-flow bodies, even when they are short. This keeps future edits safe and makes branches easy to scan.

ts
if (!user) {
  return;
}

Avoid:

ts
if (!user) return;

Apply the equivalent block form in languages with different syntax. Do not rewrite a language construct into invalid or less safe syntax merely to imitate the TypeScript example.

Explicit iteration

Avoid callback-style .forEach(...) and iterator .for_each(...). Prefer an explicit for, for...of, or language-equivalent loop so that break, continue, return, and error propagation have clear semantics.

ts
for (const item of items) {
  process(item);
}

Use transformations such as map, filter, or reduce when they express a value transformation clearly; this rule is about callback iteration, not a ban on functional operations generally.

Absence values in TypeScript and JavaScript

In TypeScript/JavaScript, represent an absent optional value with undefined or an optional field rather than null. Convert database NULL at the persistence boundary. Do not claim an external API or library omits null if it does not; normalize the value at the adapter boundary.

ts
let timeout: ReturnType<typeof setTimeout> | undefined;
type Profile = { nickname?: string };

Do not apply JavaScript's undefined rule literally to other languages. Use their explicit optional-value type or idiom (for example, Option<T> in Rust).

TypeScript safety conventions

When editing TypeScript, avoid any, type assertions (including non-null assertions), and unused variables. Prefer explicit types, validated parsers, type guards, and removing dead declarations. At external-data boundaries, receive untrusted data as unknown and validate it before it crosses into business logic.

Handle errors deliberately: do not swallow exceptions or leave empty catch handlers. Add context, map to a safe domain error, or report through the project's established mechanism. In async codebases that standardize on try/await, use that convention rather than detached promise rejection handlers.

Review checklist

  • Are conditionals and loop bodies braced and multiline?
  • Is callback-style forEach used where an explicit loop would clarify control

flow?

  • In TypeScript, are any, unsafe assertions, unused variables, and swallowed

errors avoided?

  • Is external data validated before entering business logic?
  • Did the change preserve language, API, and repository-specific contracts?

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
lucaswilliameufrasio
커뮤니티

cross-repo-standard-sync

- Find the canonical owner of a development standard, audit drift, or propagate an approved standard across repositories and agent configurations. Use when the user says their preferred workflow is out of sync, wants common rules synchronized, or asks which copy is authoritative. Separate personal defaults, organization policy, and repository facts; preserve local commands and exceptions, and never overwrite ambiguous differences without approval.

설치 수
1
GitHub Stars
0
업데이트
10월 8일
lucaswilliameufrasio
커뮤니티

performance-optimization

- Diagnose and improve application performance or resource efficiency using measured evidence. Always use when the user says an app/API is slow, reports a performance regression or bottleneck, asks to optimize/tune code, or wants higher throughput or lower latency, CPU, memory, or cost—even if they request a specific code change before providing a profile. Reproduce the workload, locate the bottleneck, change one cause at a time, and verify comparable runs.

설치 수
1
GitHub Stars
0
업데이트
10월 8일
lucaswilliameufrasio
커뮤니티

privacy-safe-skill-extraction

- Turn an internal standard, runbook, prompt, or repeated workflow into a reusable skill for a public or broader audience. Use whenever asked to generalize or publish guidance derived from private material. Preserve useful behavior while removing organization, product, customer, repository, infrastructure, and operational identifiers; inspect the final artifacts for leakage before sharing them.

설치 수
1
GitHub Stars
0
업데이트
10월 8일
lucaswilliameufrasio
커뮤니티

testing-standard

- Apply the repository testing standard whenever adding or changing code, tests, persistence, APIs, CI, or fixing a bug, and whenever asked to verify that work is complete. Select meaningful unit, integration, and regression coverage; run the repository's full documented quality gate using safe local resources; report exactly what passed, failed, or was not run. Inspect repository instructions and commands instead of assuming a universal stack.

설치 수
1
GitHub Stars
0
업데이트
10월 8일