safe-css-append
하는 일
이 스킬은 한 스타일시트에서 다른 스타일시트로 스타일을 옮기는 신중한 방법을 제공합니다. 기존 규칙을 확인하고 변수 이름을 맞춥니다. 프로젝트 사이에서 스타일을 합치는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓오래된 프로젝트에서 구성 요소 스타일 몇 개를 새 프로젝트로 복사하고 싶을 때.
- ✓이미 있는 규칙을 깨지 않고 CSS 규칙을 추가해야 할 때.
- ✓복사할 스타일이 현재 프로젝트와 다른 변수 이름을 쓸 때.
스킬 링크
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/safe-css-append/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“예전 프로젝트의 카드 스타일을 이 프로젝트에 복사해 주실 수 있나요? 지금 있는 것은 깨지지 않게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 두 스타일시트를 읽고, 빠진 규칙을 찾은 다음 변수 이름을 맞추고, 그 규칙만 추가한 뒤 결과를 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Safe CSS Append Workflow
This skill provides a systematic approach for safely appending CSS styles from a source file to a destination file. The workflow ensures no content is overwritten, CSS variables are properly adapted, and all changes are verified.
When to Use This Skill
- Migrating styles between projects
- Copying component styles while preserving existing rules
- Adding new CSS rules without duplicating or conflicting with existing styles
- Adapting styles to use a different set of CSS variables
Workflow Steps
1. Read and Analyze Source CSS
First, examine the source CSS file to identify the selectors and rules you want to transfer:
# Read the source CSS file
cat /path/to/source/styles.css
# Identify specific selectors if needed
grep "selector-pattern" /path/to/source/styles.css
Document:
- Target selectors (e.g.,
.panel-tab,.header-nav) - CSS variables used (e.g.,
--primary-color,--spacing-unit) - Complete rule sets for each selector
2. Read and Check Destination CSS
Examine the destination file to understand existing rules and avoid duplication:
# Read the destination CSS file
cat /path/to/destination/styles.css
# Check if specific selectors already exist
grep "selector-name" /path/to/destination/styles.css
# Check for existing CSS variables
grep "^[[:space:]]*--" /path/to/destination/styles.css | head -20
Identify:
- Existing selectors that might conflict
- CSS variable naming conventions in the destination
- Any existing rules for the target selectors
3. Identify Missing Styles and Required Adaptations
Compare source and destination to determine:
- Which selectors are completely missing
- Which properties are missing from existing selectors
- How CSS variables need to be mapped (source → destination)
Example variable mapping:
Source: --panel-bg → Destination: --background-secondary
Source: --text-primary → Destination: --color-text-primary
Source: --border-radius → Keep as-is (if already defined in destination)
4. Prepare Adapted CSS Content
Create the CSS content to append, adapting variables as needed:
/* Example adapted CSS */
.new-selector {
background-color: var(--background-secondary); /* was --panel-bg */
color: var(--color-text-primary); /* was --text-primary */
border-radius: var(--border-radius); /* unchanged */
padding: 8px 16px;
}
.existing-selector {
/* Only add missing properties, not the entire rule */
new-property: value;
}
5. Safely Append to Destination
Use append operations (never overwrite) to add the new styles:
# Append new CSS rules
cat >> /path/to/destination/styles.css << 'EOF'
/* Added styles from source project */
.selector-name {
property: value;
variable-property: var(--adapted-variable);
}
EOF
Best practices:
- Add a comment indicating the source or purpose
- Include a blank line before the new content for readability
- Use
>>(append) never>(overwrite)
6. Verify the Changes
Confirm that the styles were added correctly:
# View the last N lines to see appended content
tail -n 20 /path/to/destination/styles.css
# Verify specific selectors were added
grep "new-selector-name" /path/to/destination/styles.css
# Check the complete file if needed
cat /path/to/destination/styles.css | tail -n 50
Complete Example
Here's a full example workflow:
# 1. Read source CSS and identify target
cat project-a/components.css | grep -A 10 ".button-primary"
# 2. Check destination for conflicts
grep ".button-primary" project-b/main.css
grep "^[[:space:]]*--btn-" project-b/main.css
# 3. Identify that .button-primary is missing, and variables need mapping:
# --btn-color → --primary-color (exists in destination)
# --btn-padding → create inline value
# 4. Append adapted styles
cat >> project-b/main.css << 'EOF'
/* Button styles from project-a */
.button-primary {
background-color: var(--primary-color);
padding: 10px 20px;
border-radius: 4px;
font-weight: 600;
}
EOF
# 5. Verify
tail -n 10 project-b/main.css
grep ".button-primary" project-b/main.css
Safety Checklist
- Source file read and analyzed
- Destination file checked for existing rules
- Missing styles identified
- CSS variables mapped correctly
- Append operation used (not overwrite)
- Changes verified with tail/grep
- No duplicate selectors created
- [ ]
자주 묻는 질문
기존 스타일을 덮어쓰나요?
이 작업은 덮어쓰지 않도록 설계되어 있습니다. 추가하기 전에 어떤 선택자가 이미 있는지 확인합니다.
변수 이름이 다르면 어떻게 하나요?
스킬에는 복사된 스타일이 스타일시트와 맞도록 변수 이름을 바꾸는 단계가 있습니다.
사용하려면 코딩 기술이 필요한가요?
CSS에 대한 기본 지식이 도움이 되지만, 단계는 명확한 체크리스트로 쓰여 있습니다.
상세 정보
작성자의 원본 설명
Safely append CSS styles from one file to another by identifying missing rules, adapting CSS variables, and verifying changes
repo: HKUDS/AgentPilot
인기도
- GitHub 스타
- 7.8k
- 순위
- #13080
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
agentpilot
7.8k작업을 준비하고 AgentPilot 루프를 실행해 변경을 제안, 테스트, 점수화하면서 프로젝트를 단계적으로 개선하도록 돕습니다.
openspace
7.8k에이전트 스킬을 저장하고 가져오는 도구인 OpenSpace를 설정하고, MCP를 통해 AI 앱에 연결하도록 돕습니다.
rsi-arena
7.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.