소스 정보
- 저장소
- Cogni-AI-OU/cogni-ai-agent-skills
- 최근 소스 활동
- 2026년 5월 18일 15:51
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill sed명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | sed |
| description | Fast, non-interactive text stream editing and precise file segment extraction using sed. |
| license | MIT |
Fast, non-interactive text stream editing and precise file segment extraction using sed.
jq, yq) are significantly safer.ex (Vim) or Python scripting is more robust.sed syntax. Do not use interactive tools.-i (in-place) first if modifying files, or strictly use read-only modes like -n.Use this to extract a precise segment of a file (e.g., lines 80 to 95) without dumping the whole file.
sed -n '80,95p' <file>
Extract text between two known boundary strings (inclusive).
sed -n '/START_PATTERN/,/END_PATTERN/p' <file>
sed 's/old/new/' <file>
sed 's/old/new/g' <file>
Remove leading and trailing whitespace from each line. Note: \t for tabs is a GNU extension; use literal tabs or [[:blank:]] for portability.
# Trim leading spaces and tabs (GNU)
sed -e 's/^[ \t]*//g' <file>
# Trim trailing spaces and tabs (GNU)
sed -e 's/[ \t]*$//g' <file>
# Combined trim (Portable/POSIX)
sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//' <file>
Note: \u and \U are GNU sed extensions and are not portable (e.g., on macOS/BSD).
# Capitalize first character of each line (GNU)
sed 's/./\u&/' <file>
# Capitalize first character of every word (GNU)
sed -E 's/\b[a-z]/\U&/g' <file>
# Swap first and last characters of each line (Extended Regex)
# Handles 2+ characters; 1-character lines remain unchanged.
sed -E 's/(.)(.*)(.)/\3\2\1/' <file>
# Remove all XML/HTML tags
sed -e 's/<[^>]*>//g' <file>
# Convert XML/HTML tags to newlines (GNU: \n)
# Portable sed requires a literal escaped newline in the replacement.
sed -e 's/<[^>]*>/\n/g' <file>
# WIF to SHA (part of a pipeline)
base58 -d | xxd -p -c200 | sed s/^80// | rg -oz "[A-Fa-f0-9]{64}"
# Recursive directory tree visualization (simplified)
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
# List 40 largest files (recursive) - more precise than ls -R
find . -type f -exec du -h {} + | sort -hr | head -n40
# MySQL Collation Fix (Use with caution: may downgrade utf8mb4 to utf8)
# Only use if the target database does not support utf8mb4.
sed "s/utf8mb4_0900_ai_ci\|utf8mb4_unicode_ci/utf8_general_ci/g;s/\butf8mb[34]/utf8/g" <dump.sql>
When modifying files directly, use -i (or -i.bak to create backups on some OS). Note: GNU sed supports -i directly, but macOS/BSD sed requires -i ''.
# GNU sed (Linux)
sed -i 's/old/new/g' <file>
sed -n: Always suppress default output when extracting segments to prevent flooding the terminal.'...' for sed commands to avoid shell expansion issues, unless you intentionally need variable expansion (in which case use double quotes "..." carefully).sed: macOS sed -i requires an extension argument (like sed -i '' 's/old/new/g' file), whereas Linux (GNU) sed allows -i without an extension. Since the agent primarily runs on Linux, sed -i is usually safe, but be cautious of cross-platform scripts.sed uses Basic Regular Expressions (BRE). You must escape +, ?, |, (, ), {, }. To use Extended Regular Expressions (ERE), pass the -E flag (e.g., sed -E 's/(foo|bar)/baz/g').sed to edit JSON, YAML, or XML files when structured tools like jq or yq are available.sed to edit source code AST when specialized formatting/refactoring tools exist.