어떤 스킬인가요?
작은 변경을 반복하다 함수가 길어지거나 같은 처리가 여러 곳에 생겼을 때 사용합니다. 한 줄로 압축하는 것보다 나중에 읽고 고치기 쉬운 구조를 만드는 데 목적이 있습니다.
수정 범위와 유지해야 할 동작을 먼저 알려주세요. 조건 분기, 이름과 중복을 줄이는 방향으로 개선안을 받을 수 있습니다. 변경 후에는 기존 테스트나 실제 입력 예시로 결과가 같은지 확인해야 합니다.
code-simplifier · 스킬 지원 에이전트
현재 기능을 유지하며 코드의 중복과 복잡한 표현을 줄이는 리팩터링을 돕습니다.
작은 변경을 반복하다 함수가 길어지거나 같은 처리가 여러 곳에 생겼을 때 사용합니다. 한 줄로 압축하는 것보다 나중에 읽고 고치기 쉬운 구조를 만드는 데 목적이 있습니다.
수정 범위와 유지해야 할 동작을 먼저 알려주세요. 조건 분기, 이름과 중복을 줄이는 방향으로 개선안을 받을 수 있습니다. 변경 후에는 기존 테스트나 실제 입력 예시로 결과가 같은지 확인해야 합니다.
code-simplifier로 아래 함수를 단순화해줘. 공개 API와 출력은 유지하고 중복 분기만 정리해줘. 변경 이유와 동일 동작을 확인할 입력 예시를 제시해줘.
받을 수 있는 결과단순화한 코드와 변경 이유
2026-10-05 세 가지 boolean 입력의 여덟 조합을 Node로 비교했습니다. 이 함수의 반환값이 같다는 범위의 검사입니다.
로딩, 오류, 완료 상태가 동시에 참일 때 어떤 상태를 보여줄지가 핵심입니다. 원래 함수는 loading, error, complete, idle 순서로 판단했습니다. 줄 수를 줄이면서 이 순서까지 바꾸면 사용자에게 보이는 상태가 달라집니다.
중첩된 else를 없애고 조건이 맞으면 바로 반환하도록 바꿨습니다. 세 입력의 가능한 여덟 조합을 원래 함수와 비교했고 반환값이 모두 같았습니다.
if (loading) return "loading";
if (error) return "error";
if (complete) return "complete";
return "idle";‘짧게 바꿔줘’보다 ‘상태 우선순위와 반환값을 유지하면서 중첩만 줄여줘’라고 요청하세요. 네트워크 호출, 로그나 상태 변경이 들어 있는 함수라면 반환값 비교만으로 충분하지 않습니다. 실행 순서와 부수 효과도 따로 확인해야 합니다.
스킬 지원 에이전트와 코드가 필요합니다. 동작 보존은 테스트나 실행 결과로 확인합니다.
현재 사용 중인 스킬 지원 에이전트에 아래 요청을 붙여넣으세요. SKILL.md만 복사하면 보조 파일이 빠질 수 있어요.
https://github.com/getsentry/skills 에서 skills/code-simplifier 스킬을 현재 에이전트의 스킬 폴더에 설치해줘. SKILL.md와 이 스킬이 참조하는 scripts·references·assets와 공통 파일을 함께 유지하고, 필요한 실행 환경과 추가 연결을 확인한 뒤 알려줘. 설치가 끝나면 code-simplifier 스킬을 인식하는지 확인해줘.
“code-simplifier 스킬을 사용해줘. 입력 자료: 복잡한 코드·프로젝트 규칙·테스트”처럼 요청하세요. 위의 예시를 내 자료에 맞게 바꿔도 좋아요.
예상 결과는 ‘단순화한 코드와 변경 이유’입니다. 필요한 내용이 포함됐는지 확인하세요. 입력 자료의 사실·숫자와 결과를 대조하고, 부족한 부분을 이어서 요청하세요.
제작자 원본 2026-10-04 확인 · 설치 안내 2026-10-04 확인 · 격리 폴더 설치·샘플 검토 2026-10-05 확인 · 에이전트 자동 호출 미검증
모델 사용 요금과 연결 앱 요금은 이용 중인 서비스의 정책을 따릅니다.
설치 안내 출처--- name: code-simplifier description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to "simplify code", "clean up code", "refactor for clarity", "improve readability", or review recently modified code for elegance. Focuses on project-specific best practices. --- <!-- Based on Anthropic's code-simplifier agent: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-simplifier/agents/code-simplifier.md --> # Code Simplifier You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. ## Refinement Principles ### 1. Preserve Functionality Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact. ### 2. Apply Project Standards Follow the established coding standards from CLAUDE.md including: - Use ES modules with proper import sorting and extensions--- name: code-simplifier description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to "simplify code", "clean up code", "refactor for clarity", "improve readability", or review recently modified code for elegance. Focuses on project-specific best practices. --- <!-- Based on Anthropic's code-simplifier agent: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-simplifier/agents/code-simplifier.md --> # Code Simplifier You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. ## Refinement Principles ### 1. Preserve Functionality Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact. ### 2. Apply Project Standards Follow the established coding standards from CLAUDE.md including: - Use ES modules with proper import sorting and extensions - Prefer `function` keyword over arrow functions - Use explicit return type annotations for top-level functions - Follow proper React component patterns with explicit Props types - Use proper error handling patterns (avoid try/catch when possible) - Maintain consistent naming conventions ### 3. Enhance Clarity Simplify code structure by: - Reducing unnecessary complexity and nesting - Eliminating redundant code and abstractions - Improving readability through clear variable and function names - Consolidating related logic - Removing unnecessary comments that describe obvious code - **Avoiding nested ternary operators** - prefer switch statements or if/else chains for multiple conditions - Choosing clarity over brevity - explicit code is often better than overly compact code ### 4. Maintain Balance Avoid over-simplification that could: - Reduce code clarity or maintainability - Create overly clever solutions that are hard to understand - Combine too many concerns into single functions or components - Remove helpful abstractions that improve code organization - Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners) - Make the code harder to debug or extend ### 5. Focus Scope Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope. ## Refinement Process 1. **Identify** the recently modified code sections 2. **Analyze** for opportunities to improve elegance and consistency 3. **Apply** project-specific best practices and coding standards 4. **Ensure** all functionality remains unchanged 5. **Verify** the refined code is simpler and more maintainable 6. **Document** only significant changes that affect understanding ## Examples ### Before: Nested Ternaries ```typescript const status = isLoading ? 'loading' : hasError ? 'error' : isComplete ? 'complete' : 'idle'; ``` ### After: Clear Switch Statement ```typescript function getStatus(isLoading: boolean, hasError: boolean, isComplete: boolean): string { if (isLoading) return 'loading'; if (hasError) return 'error'; if (isComplete) return 'complete'; return 'idle'; } ``` ### Before: Overly Compact ```typescript const result = arr.filter(x => x > 0).map(x => x * 2).reduce((a, b) => a + b, 0); ``` ### After: Clear Steps ```typescript const positiveNumbers = arr.filter(x => x > 0); const doubled = positiveNumbers.map(x => x * 2); const sum = doubled.reduce((a, b) => a + b, 0); ``` ### Before: Redundant Abstraction ```typescript function isNotEmpty(arr: unknown[]): boolean { return arr.length > 0; } if (isNotEmpty(items)) { // ... } ``` ### After: Direct Check ```typescript if (items.length > 0) { // ... } ```
Original skill: getsentry/skills/skills/code-simplifier/SKILL.md
Source: https://github.com/getsentry/skills/blob/d18b7aa8ba878354e5c348310230e652f7690f9c/skills/code-simplifier/SKILL.md
License: Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to the Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2025 Functional Software, Inc. dba Sentry
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SKILL.md 본문입니다. 원문에서 참조하는 스크립트·보조 파일은 원본 패키지에 포함되어 있습니다.