소스 정보
- 저장소
- personamanagmentlayer/pcl
- 최근 소스 활동
- 2026년 1월 19일 22:04
- 감지된 SKILL.md 언어
- 영어
- 스타
- 40
- 포크
- 9
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/personamanagmentlayer/pcl --skill finops-expert명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | finops-expert |
| version | 1.0.0 |
| description | Expert-level cloud financial operations, cost optimization, and cloud economics |
| category | professional |
| tags | ["finops","cloud-cost","optimization","cloud-economics","aws-cost"] |
| allowed-tools | ["Read","Write","Edit","Bash(*)"] |
Expert guidance for cloud financial operations, cost optimization, resource management, and cloud economics.
import boto3
from datetime import datetime, timedelta
from typing import Dict, List
import pandas as pd
class AWSCostAnalyzer:
"""Analyze AWS costs using Cost Explorer API"""
def __init__(self):
self.ce_client = boto3.client('ce')
def get_cost_and_usage(self, start_date: str, end_date: str,
granularity: str = 'DAILY',
metrics: List[str] = None) -> Dict:
"""Get cost and usage data"""
if metrics is None:
metrics = ['UnblendedCost', 'UsageQuantity']
response = self.ce_client.get_cost_and_usage(
TimePeriod={
'Start': start_date,
'End': end_date
},
Granularity=granularity,
Metrics=metrics,
GroupBy=[
{'Type': 'DIMENSION', 'Key': 'SERVICE'}
]
)
return response['ResultsByTime']
def get_top_services_by_cost(self, days: = , top_n: = ) -> pd.DataFrame:
end_date = datetime.now().strftime()
start_date = (datetime.now() - timedelta(days=days)).strftime()
results = .get_cost_and_usage(start_date, end_date, )
service_costs = {}
result results:
group result[]:
service = group[][]
cost = (group[][][])
service service_costs:
service_costs[service] += cost
:
service_costs[service] = cost
df = pd.DataFrame((service_costs.items()),
columns=[, ])
df.nlargest(top_n, )
() -> :
start_date = datetime.now().strftime()
end_date = (datetime.now() + timedelta(days=days_ahead)).strftime()
response = .ce_client.get_cost_forecast(
TimePeriod={
: start_date,
: end_date
},
Metric=,
Granularity=
)
{
: (response[][]),
: (response[][][])
}
() -> []:
response = .ce_client.get_rightsizing_recommendation(
Service=
)
recommendations = []
rec response[]:
recommendations.append({
: rec[][],
: rec[][],
: rec[][][][]
rec.get() ,
: (rec[][])
rec.get()
})
recommendations
:
():
.ec2_client = boto3.client()
.rds_client = boto3.client()
.s3_client = boto3.client()
() -> [, ]:
idle_resources = {
: [],
: [],
: [],
: []
}
instances = .ec2_client.describe_instances(
Filters=[{: , : []}]
)
reservation instances[]:
instance reservation[]:
idle_resources[].append({
: instance[],
: instance[],
: instance[][]
})
volumes = .ec2_client.describe_volumes(
Filters=[{: , : []}]
)
volume volumes[]:
idle_resources[].append({
: volume[],
: volume[],
: volume[]
})
addresses = .ec2_client.describe_addresses()
address addresses[]:
address:
idle_resources[].append({
: address[],
: address[]
})
idle_resources
() -> :
on_demand_hourly = ._get_on_demand_price(instance_type)
ri_hourly = on_demand_hourly *
hours_per_year = *
annual_on_demand = on_demand_hourly * hours_per_year * count
annual_ri = ri_hourly * hours_per_year * count
{
: instance_type,
: count,
: annual_on_demand,
: annual_ri,
: annual_on_demand - annual_ri,
: ((annual_on_demand - annual_ri) / annual_on_demand) *
}
() -> :
prices = {
: ,
: ,
: ,
: ,
:
}
prices.get(instance_type, )
class CostAllocation:
"""Manage cost allocation with tags"""
def __init__(self):
self.ec2_client = boto3.client('ec2')
self.ce_client = boto3.client('ce')
def define_tagging_strategy(self) -> Dict[str, List[str]]:
"""Define mandatory tags"""
return {
'environment': ['prod', 'staging', 'dev'],
'team': ['engineering', 'data', 'product'],
'cost_center': ['CC001', 'CC002', 'CC003'],
'project': ['project-a', 'project-b'],
'owner': ['email addresses']
}
def audit_resource_tags(self, resource_type: str = 'instance') -> List[Dict]:
"""Audit resources for missing tags"""
mandatory_tags = ['environment', 'team', 'cost_center']
untagged_resources = []
if resource_type == 'instance':
instances = .ec2_client.describe_instances()
reservation instances[]:
instance reservation[]:
tags = {tag[]: tag[]
tag instance.get(, [])}
missing_tags = [tag tag mandatory_tags
tag tags]
missing_tags:
untagged_resources.append({
: instance[],
: missing_tags
})
untagged_resources
() -> pd.DataFrame:
response = .ce_client.get_cost_and_usage(
TimePeriod={
: start_date,
: end_date
},
Granularity=,
Metrics=[],
GroupBy=[
{: , : tag_key}
]
)
costs = []
result response[]:
group result[]:
costs.append({
: group[][].split()[]
group[][] ,
: (group[][][])
})
pd.DataFrame(costs)
class BudgetManager:
"""Manage AWS budgets and alerts"""
def __init__(self):
self.budgets_client = boto3.client('budgets')
self.account_id = boto3.client('sts').get_caller_identity()['Account']
def create_monthly_budget(self, name: str, amount: float,
email: str) -> Dict:
"""Create monthly cost budget with alerts"""
budget = {
'BudgetName': name,
'BudgetLimit': {
'Amount': str(amount),
'Unit': 'USD'
},
'TimeUnit': 'MONTHLY',
'BudgetType': 'COST'
}
# Alert at 80% and 100%
notifications = [
{
'Notification': {
'NotificationType': 'ACTUAL',
'ComparisonOperator': 'GREATER_THAN',
'Threshold': 80,
'ThresholdType': 'PERCENTAGE'
},
'Subscribers': [{
'SubscriptionType': 'EMAIL',
'Address': email
}]
},
{
: {
: ,
: ,
: ,
:
},
: [{
: ,
: email
}]
}
]
response = .budgets_client.create_budget(
AccountId=.account_id,
Budget=budget,
NotificationsWithSubscribers=notifications
)
response
❌ No tagging strategy ❌ Ignoring rightsizing recommendations ❌ Not using Reserved Instances ❌ No budget alerts ❌ Keeping idle resources ❌ Manual cost tracking ❌ Siloed cost responsibility
SOC 직업 분류 기준